Re: pid_t data type
- From: Rainer Weikusat <rweikusat@xxxxxxxxxxx>
- Date: Sun, 16 Mar 2008 08:34:19 +0100
Logan Shaw <lshaw-usenet@xxxxxxxxxxxxx> writes:
Sanchit wrote:
So if i will use long.. and i am not concerned with memory
management.. will it be fine in every case..
If you use pid_t, it will be fine in every case. If you use
long, there are no guarantees. If you use pid_t, you will be
using what the producers of the system have tested. If you
use long, you will be using something that is unsupported and
untested.
A 'typedef-name' is just an alias for an existing type. This means
that if an implementation had a
typedef long pid_t
the only difference between the two would be that usage looked
different in source code. One of the nice properties of C is that
'types' stick to objects and not to values: A value originally
returned be fork can be stored into anything large enough to represent
it without being "damaged" and a compiler is required to not introduce
artificial differences between identically valued numbers coming from
different origins.
.
- Follow-Ups:
- Re: pid_t data type
- From: Sanchit
- Re: pid_t data type
- From: William Ahern
- Re: pid_t data type
- From: Logan Shaw
- Re: pid_t data type
- References:
- pid_t data type
- From: Sanchit
- Re: pid_t data type
- From: Lew Pitcher
- Re: pid_t data type
- From: Sanchit
- Re: pid_t data type
- From: Logan Shaw
- pid_t data type
- Prev by Date: Re: pid_t data type
- Next by Date: Read from a Message Queue
- Previous by thread: Re: pid_t data type
- Next by thread: Re: pid_t data type
- Index(es):
Relevant Pages
|