[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [linux-team] Programme continue à tourner quand je me deconnecte
"Schaller, Frédéric" wrote:
>
> En fait, c'est un programme qui était lancé automatiquement au
> démarrage mais je l'ai retiré et j'ai fait un script pour le lancer à la
> demande (il n'y a que le root qui peux lancer ce programme).
> J'ai déjà essayé nohup ./nomduscript & mais je n'aime pas tellement
> cette methode. La methode du trap shell me semble meilleure, mais je n'ai
> pas de page man sur trap et je n'ai pas de trap --help, ou pourrais-je
> trouver plus d'info ou comment lancer ce programme via mon script et trap.
> Le but étant de lancer le programme comme-ci c'était le système qui l'avait
> lancé et pas par un utilisateur ou le root.
> Encore merci pour tout votre aide
Tu fais un 'man bash' et l'info sur trap se trouve la-dedans:
trap [-lp] [arg] [sigspec ...]
The command arg is to be read and executed when the
shell receives signal(s) sigspec. If arg is absent
or -, all specified signals are reset to their
original values (the values they had upon entrance
to the shell). If arg is the null string the sig
nal specified by each sigspec is ignored by the
shell and by the commands it invokes. If arg is -p
then the trap commands associated with each sigspec
are displayed. If no arguments are supplied or if
only -p is given, trap prints the list of commands
associated with each signal number. Each sigspec
is either a signal name defined in <signal.h>, or a
signal number. If a sigspec is EXIT (0) the com
mand arg is executed on exit from the shell. If a
sigspec is DEBUG, the command arg is executed after
every simple command (see SHELL GRAMMAR above).
The -l option causes the shell to print a list of
signal names and their corresponding numbers. Sig
nals ignored upon entry to the shell cannot be
trapped or reset. Trapped signals are reset to
their original values in a child process when it is
created. The return status is false if any sigspec
is invalid; otherwise trap returns true.
Ludovic Kuty
---------
Visit the Linux Supertore Online: http://www.redcorp.com !
If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.
Archive of the list: http://tania.be.linux.org/