nmh-workers
[Top] [All Lists]

Re: [nmh-workers] closefds() _before_ fork?

2019-04-23 15:47:03
    Date:        Tue, 23 Apr 2019 14:39:48 -0400
    From:        "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" <valdis.kletnieks@vt.edu>
    Message-ID:  <17777.1556044788@turing-police>

  | The point is that the fragment of code doesn't actually *know* "it happened
  | to be what is wanted on stdin". For all this code knows, it's a dangling fd
  | that was opened by some library function to talk to dbus or something.

??

fd is deliberately being made stdin (I did not look at the code to see
where that comes from, but I can only assume that it comes from somewhere).

fd is also made to be fd 3.

If it is good enough to be stdin, it is good enough to be 3 as well,
if there is (or once was) some reason this is important.

kre


-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>