Vasilii Kolobkov on Nostr: firefly My bad, sorry, was sleepy. The umask(2) call *sets* the mask to the given ...
firefly (npub16a3…hqv6) My bad, sorry, was sleepy.
The umask(2) call *sets* the mask to the given value. The ANDing with the negative takes place in the calls governed by the value of the mask, e.g. at the time of open(2).
Furthermore, if it was due to semantics of the umask, then it still won't explain why the two original lines where producing different results.
Since they differ only in presence of pipe, it seems only reasonable to surmise that it's the contexts of the umask(2) calls that differs.
The umask(2) call *sets* the mask to the given value. The ANDing with the negative takes place in the calls governed by the value of the mask, e.g. at the time of open(2).
Furthermore, if it was due to semantics of the umask, then it still won't explain why the two original lines where producing different results.
Since they differ only in presence of pipe, it seems only reasonable to surmise that it's the contexts of the umask(2) calls that differs.