The Gecko wrote:
On 14-Jul-98 Michael Lankton wrote:
How can I execute a program and leave X cleanly in a shell script? What would I follow the program execution with to exit X?:
I even installed xtexit and tried :
#!/bin/sh exec program exec xtexit
but it would just exec the first program and stop. Appreciate a nudge in the right direction.
Why do you use 'exec' ? man bash: ... exec [-cl] [-a name] [command] [arguments] If command is specified, it replaces the shell. No new process is created. The arguments become the arguments to command. If the -l option is sup plied, the shell places a dash in the zeroth arg passed to command. This is what login(1) does. The -c option causes command to be executed with an empty environment. If -a is supplied, the shell passes name as the zeroth argument to the executed command. If command cannot be executed for some reason, a non-interactive shell exits, unless the shell option execfail is enabled, in which case it returns failure. An interactive shell returns failure if the file cannot be executed. If command is not specified, any redirections take effect in the current shell, and the return status is 0. ... Try to do #!/bin/sh program & xtexit or (if you really want to use 'exec'): #!/bin/sh ( exec program ) xtexit Ciao, BB -- Bodo Bauer S.u.S.E., LLC fon +1-510-835 7873 bb@suse.de 458 Santa Clara Avenue fax +1-510-835 7875 <A HREF="http://www.suse.com"><A HREF="http://www.suse.com</A">http://www.suse.com</A</A>> Oakland CA, 94610 USA - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e