[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] nohup behaviour differs slightly from coreutils nohup
From:       Bernhard Fischer <rep.dot.nop () gmail ! com>
Date:       2008-01-31 20:28:11
Message-ID: 20080131202811.GA26554 () aon ! at
[Download RAW message or body]

On Thu, Jan 31, 2008 at 07:39:42PM +0100, 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, or if this behaviour is
>intended, let me know why.

hm. I'm pretty sure that we mached coreutils behaviour at one time (when
i last touched nohup). I did not really test it thoroughly, but i have
the impression that my
$ nohup --version
nohup (GNU coreutils) 5.97
behaves like what was implemented back then. Perhaps you can check
against that version, too (both the pristine busybox version as well as
your new coreutils version)?

TIA,
>tested with:
>
>$ nohup --version
>nohup (GNU coreutils) 6.9
>
>$ busybox
>BusyBox v1.9.0 (2008-01-31 16:29:55 CET) multi-call binary
>
>Thanks, and keep up the good work!
>
>Christoph Gysin
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic