PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > Background process implementation
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

Background process implementation

Réponse
 
LinkBack Outils de la discussion
Vieux 29/10/2007, 19h34   #1
Payel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Background process implementation

Hi,

I am trying to implement background process(bg command) in my unix
shell. Could anybody please tell me how I can proceed to implement it
in my shell?

Thanks.

  Réponse avec citation
Vieux 29/10/2007, 19h49   #2
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background process implementation

2007-10-29, 18:34(-00), Payel:
[...]
> I am trying to implement background process(bg command) in my unix
> shell. Could anybody please tell me how I can proceed to implement it
> in my shell?

[...]

bg only sends a SIGCONT to the process group of the stopped
process.

It's upon the <Ctrl-Z> that you need to do something: set the
terminal's foreground process group (tcsetpgrp(3)) back to the
shell.

--
Stéphane
  Réponse avec citation
Vieux 29/10/2007, 19h52   #3
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background process implementation

2007-10-29, 18:49(+00), Stephane CHAZELAS:
> 2007-10-29, 18:34(-00), Payel:
> [...]
>> I am trying to implement background process(bg command) in my unix
>> shell. Could anybody please tell me how I can proceed to implement it
>> in my shell?

> [...]
>
> bg only sends a SIGCONT to the process group of the stopped
> process.


Let me rephrase that a bit more sanely:

bg sends a SIGCONT to the stopped process group.

When you start a job, you create a new process group with
setpgid(3). If you start it in foreground (without &), you also
need to make that process group the foreground process group
(tcsetpgrp(3)).


> It's upon the <Ctrl-Z> that you need to do something: set the
> terminal's foreground process group (tcsetpgrp(3)) back to the
> shell.
>



--
Stéphane
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h54.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08900 seconds with 11 queries