bug-parallel
[Top][All Lists]
Advanced

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

GNU Parallel Bug Reports parallel + timeout + cygwin


From: Miroslav Hudec
Subject: GNU Parallel Bug Reports parallel + timeout + cygwin
Date: Fri, 11 Jul 2014 18:01:57 +0200

Hello,

When parallel is used with --timeout option under Cygwin environment, and the executed command times out -  the following error is reported:

address@hidden ~$ echo 1 | parallel --timeout 5 'sleep 10'
ps: unknown option -- o
Try `ps --help' for more information.
address@hidden ~$

The issue is that the GNU Parallel (20140622) on line 4727 does not recognizes cygwin as valid OS and presumes the OS is BSD:
4727   if ($^O eq 'linux' or $^O eq 'solaris' ) {
4728     # Table with pid parentpid (SysV + GNU)
4729     @pidtable = `ps -ef | awk '{print \$2" "\$3}'`;
4730   } else {
4731     # Table with pid parentpid (BSD)
4732     @pidtable = `ps -o pid,ppid -ax`;
4733   }

In cygwin env the perl variable ^O is set to "cygwin".

The fix is to add the 'cygwin' to the if condition
4727   if ($^O eq 'linux' or $^O eq 'solaris' or $^O eq 'cygwin' ) {

address@hidden ~$ echo 1 | parallel --timeout 5 'sleep 10'
address@hidden ~$

Would it be possible to include this fix to the next parallel release, please?

Cygwin version:
address@hidden ~$ uname -r
1.7.30(0.272/5/3)

PS version:
address@hidden ~$ ps -V
ps (cygwin) 1.7.30
Show process statistics
Copyright (C) 1996 - 2014 Red Hat, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
address@hidden ~$

PS returns following columns when called with -ef options:
address@hidden ~$ ps -ef |head -1
     UID     PID    PPID  TTY        STIME COMMAND
address@hidden ~$



Thanks
Best Regards
Miro

 

reply via email to

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