Re: [PATCH] fdflags: fix -s with multiple flags, and multiple fd arguments

2023-11-14 Thread Chet Ramey
On 11/5/23 8:51 AM, Emanuele Torre wrote: fdflags -s was re-parsing the setspec for each fd argument. This is problematic because it is using strtok() to parse it destructively. So, only the first part of the setspec will be set for all file descriptors; the other parts will only be set for th

[PATCH] fdflags: fix -s with multiple flags, and multiple fd arguments

2023-11-05 Thread Emanuele Torre
fdflags -s was re-parsing the setspec for each fd argument. This is problematic because it is using strtok() to parse it destructively. So, only the first part of the setspec will be set for all file descriptors; the other parts will only be set for the first file descriptor: $ enable fdflags