mailto:ovs-dev-
> > boun...@openvswitch.org] On Behalf Of Alin Serdean
> > Sent: Wednesday, April 19, 2017 8:03 AM
> > To: Ben Pfaff
> > Cc: d...@openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and
> > getcwd
> >
&g
n.
>
> > -Original Message-
> > From: Ben Pfaff [mailto:b...@ovn.org]
> > Sent: Wednesday, April 19, 2017 7:55 AM
> > To: Alin Serdean
> > Cc: Sairam Venugopal ; d...@openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH 02/10] windows: add definition of g
dnesday, April 19, 2017 7:55 AM
> To: Alin Serdean
> Cc: Sairam Venugopal ; d...@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and
> getcwd
>
> I don't know how much risk there is. If the values actually returned in
> practi
y, April 15, 2017 6:27 AM
> > To: Sairam Venugopal
> > Cc: Alin Serdean ;
> > d...@openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and
> > getcwd
> >
> > If GetCurrentProcessId() is a reasonable substitute for getpid
as we already have for `string.h`.
What do you think?
Thanks,
Alin.
> -Original Message-
> From: Ben Pfaff [mailto:b...@ovn.org]
> Sent: Saturday, April 15, 2017 6:27 AM
> To: Sairam Venugopal
> Cc: Alin Serdean ;
> d...@openvswitch.org
> Subject: Re: [ovs-dev]
If GetCurrentProcessId() is a reasonable substitute for getpid(), but
the return type is different, then I would suggest an inline function,
like this:
static inline pid_t
getpid(void)
{
return GetCurrentProcessId();
}
Thanks,
Ben.
On Tue, Mar 07, 2017 at 09:07:55AM +, Sairam Venugopal
Shouldn’t we cast the DWORD to unsigned int for the GetCurrentProcessId?
On 2/5/17, 8:41 PM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean"
wrote:
>getcwd - is used in lib/util.c. getcwd is deprecated on Windows but has
>_getcwd which is defined in :
>https://urldefense.proofpo
getcwd - is used in lib/util.c. getcwd is deprecated on Windows but has
_getcwd which is defined in :
https://msdn.microsoft.com/en-us/library/sf98bd4y(v=vs.120).aspx
getpid - is used in several files (i.e. lib/vlog.c). getpid
is also and deprecated and _getpid should be used:
https://msdn.microso