[PATCH] nohup behaviour differs slightly from coreutils nohup
Denis Vlasenko
vda.linux at googlemail.com
Mon Feb 4 00:30:26 UTC 2008
On Thursday 31 January 2008 18:39, Christoph Gysin wrote:
> Hi list
>
> I found a minor bug in busybox-1.9.0. The nohup module doesn't behave like nohup
> from coreutils when it comes to output redirection.
>
> To test all possible cases I used the following little script:
>
> $ cat stdout-stderr
> #!/bin/bash
> echo stdout
> echo stderr 1>&2
>
> With this, I compared the behaviour of nohup and busybox's nohup module with
> different output redirections:
>
> $ nohup ./stdout-stderr
> $ busybox nohup ./stdout-stderr
> $ nohup ./stdout-stderr 1>stdout.log
> $ busybox nohup ./stdout-stderr 1>stdout.log
> $ nohup ./stdout-stderr 2>stderr.log
> $ busybox nohup ./stdout-stderr 2>stderr.log
> $ nohup ./stdout-stderr 1>stdout.log 2>stderr.log
> $ busybox nohup ./stdout-stderr 1>stdout.log 2>stderr.log
>
> After each command I checked the contents of nohup.out, stdout.log and
> stderr.log. "file" stands for the output file nohup.out, "errmsg" stands for
> the message nohup prints ("redirecting output to nohup.out"). These are
> the results:
>
> +-----------------++--------------------------+--------------------------+
> | filedescriptors || nohup | busybox |
> +--------+--------++--------+--------+--------+--------+--------+--------+
> | stdout | stderr || stdout | stderr | errmsg | stdout | stderr | errmsg |
> +--------+--------++--------+--------+--------+--------+--------+--------+
> | tty | tty || file | file | stderr | file | file | stderr |
> | tty | - || file | stderr | stderr | file | - | - |
> | - | tty || stdout | stdout | stderr | - | - | stderr |
> | - | - || stdout | stderr | stderr | - | - | - |
> +--------+--------++--------+--------+--------+--------+--------+--------+
>
> Please include my patch if you find it useful
Applied, thanks! [I also tried to create testsuite for this, but it proved
highly non-trivial :(. ]
Please test whether current svn works better.
--
vda
More information about the busybox
mailing list