Re: Lindows programs unexpectantly closing



On 2007-06-29, goarilla wrote:
Chris F.A. Johnson wrote:
On 2007-06-29, sk8r-365 wrote:
Chris F.A. Johnson said:
On 2007-06-29, sk8r-365 wrote:
If you use '&' there is little likelihood for output because that
shell will not have that app as a child process.
A background process *is* a child of the shell that spawned it, and
anything it sends to stdout or stderr will appear in that shell.
Not always the case from what I've seen. Had a problem with gphoto2
a while ago - I use a card reader now because of it - and _no_ error
messages appeared *anywhere* I searched to indicate why the application
crashed when trying to access the camera. Plus, on Debian Etch,
gnomesword 2.1.9-1 crashes without any output messages either to console
or .xsession-errors when executed without or without an ampersand.

Then they are not sending anything to stdout or stderr. Putting
them in the background or not will make no difference.

i agree
some programs dont even open the necessary file handles to even report
stdout and stderr back to the terminal
check this by cat /proc/process_id/fd/* if they don't have a console or
pseudo console
as file handle then they can't even report back to the term that has
started it

you can however start a process in background with a parent process
that's a subshell like this
( command &)

if you do that then yes it won't report back to the terminal the command
was typed in

Yes it will. If the command sends anything to stdout or stderr it
will appear in the terminal in which the command was typed.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
.



Relevant Pages

  • Re: STDOUT and STDERR redirection fails for forked process
    ... Simply, fork a command using the OPEN instruction, ... redirect STDERR to STDOUT and capture the returncode of the executed ... and the returncode is not captured. ...
    (comp.lang.perl.misc)
  • Re: getting stdout and stderr for system calls on windows
    ... It doesn't separate stderr and stdout, but for what I want it, it's more than enough. ... #You can then access the output and the return value for the command. ... def initialize cmd ...
    (comp.lang.ruby)
  • Re: How can i let shell program within TCL show run log?
    ... You'll find there that>@ means "redirect child's stdout to a Tcl ... and 2>@ the same for child's stderr. ... could be directly ran to display a command output on a text widget (a ...
    (comp.lang.tcl)
  • Re: Copying silently.
    ... so as to ReDirect both StdIn & StdErr for a Command, ... to think that "I've done it" is fit for stdout, ... do it" is fit for stderr. ... for reports on both Failure & Success? ...
    (uk.people.silversurfers)
  • Re: test whether stdout==stderr?
    ... > By default the shell attaches stdout and stderr to the same device, ... Actually it isn't the shell that does this. ...
    (comp.os.linux.development.apps)