[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Parallel Bug Reports parallel: existing file descriptors 3-61 ar

From: Ole Tange
Subject: Re: GNU Parallel Bug Reports parallel: existing file descriptors 3-61 are closed
Date: Sun, 22 May 2016 22:48:36 +0200

On Tue, May 17, 2016 at 12:16 AM, Benjamin Moody
<address@hidden> wrote:

> It seems that 'parallel' will (always?) automatically close all file
> descriptors in the range 3 to 61 before starting the child process.


> This does not seem like a *useful* feature to me,

Not surprisingly.

> and is in fact making my life a bit difficult at the moment.

Ahh... a true shell hacker! I like.

> Is there a reason for this behavior?


It has long been the idea that GNU Parallel should be able to buffer
output on not only stdout and stderr, but also any other redirected
file descriptor, so that this would not mix output:

  parallel "traceroute >&33" ::: foo.com bar.com baz.com 33>file

But I have been unable to find a way to do IPC::open3 with n file
handles. Thus only the first step (marking all file handles open in
the shell) was made.

Bash made it clear that looking at file descriptors >= 62 was a bad
idea, and I figured that most would never need 61 redirections anyway,
so I limited it to 61.

But since I still have not found an n-way open3 command, then it is
probably time to limit the file descriptors to 1 and 2, and only
change this back when the n-way open3 command is found.

Checkout the current git version.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]