Re: [dev] [PATCH 1/1] remove useless dup()

From: Connor Lane Smith <cls_AT_lubutu.com>
Date: Wed, 8 Jul 2015 11:43:38 +0200

Hi,

On 8 July 2015 at 11:32, Christian Hesse <list_AT_eworm.de> wrote:
> We are ignoring return value of dup(), so just remove it.

This code was brought up a few months ago [1]. The return value is
ignored because, as STDIN_FILENO is 0 and has just been closed, the
returned new file descriptor must be 0. A number of us think that the
implicitness here is a mistake, and that dup2 should be used instead
of close & dup, but the devs apparently disagree.

[1]: http://lists.suckless.org/dev/1504/26505.html

Thanks,
cls
Received on Wed Jul 08 2015 - 11:43:38 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 08 2015 - 11:48:07 CEST