[Sussex] the who/what/why/when of processes ( proc-i ? ;)

Geoff Teale Geoff.Teale at claybrook.co.uk
Thu Sep 5 11:56:01 UTC 2002


Oops.. should say that the other If conditions are just checking to see
which process we are executing in.

When you fork you create an exact copy of the running process at the same
point of execution.  Assuming the fork was succesful the if is checking
whether it's process ID is the ID of the parent process, if it isn't then it
knows it is the child process.

-- 
Geoff Teale
geoff.teale at claybrook.co.uk
 

> -----Original Message-----
> From: Geoff Teale 
> Sent: 05 September 2002 11:54
> To: 'sussex at mailman.lug.org.uk'
> Subject: RE: [Sussex] the who/what/why/when of processes ( proc-i ? ;)
> 
> 
> Dunk
> 
> 1.  The first If statement simply checks to see if the fork 
> was succesful.
> The value -1 represents an error in execution.
> 
> 2. The second part of your question is more complex.  I'll 
> try and find a
> nice resource to show you how different programs handle 
> creating processes
> upon request.
> 
> 
> -- 
> Geoff Teale
> geoff.teale at claybrook.co.uk
> 
> 
> The above information is confidential to the addressee and 
> may be privileged.  Unauthorised access and use is prohibited.
>  
> Internet communications are not secure and therefore this 
> Company does not accept legal responsibility for the contents 
> of this message.
>  
> If you are not the intended recipient, any disclosure, 
> copying, distribution or any action taken or omitted to be 
> taken in reliance on it, is prohibited and may be unlawful.
>  
> Claybrook Computing Limited is a subsidiary of Claybrook 
> Computing (Holdings) Limited
> Registered Office: Abbey House. 282 Farnborough Road, 
> Farnborough, Hampshire GU14 7NJ
> Registered in England and Wales No 1287205
>  
> A Hogg Robinson plc company
> 
> 
> _______________________________________________
> Sussex mailing list
> Sussex at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/sussex
> 


The above information is confidential to the addressee and may be privileged.  Unauthorised access and use is prohibited.
 
Internet communications are not secure and therefore this Company does not accept legal responsibility for the contents of this message.
 
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
 
Claybrook Computing Limited is a subsidiary of Claybrook Computing (Holdings) Limited
Registered Office: Abbey House. 282 Farnborough Road, Farnborough, Hampshire GU14 7NJ
Registered in England and Wales No 1287205
 
A Hogg Robinson plc company





More information about the Sussex mailing list