mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:03:33 +03:00
Use a long int data type to handle getpid() result
This commit is contained in:
parent
2c0956200f
commit
fecb67b246
3 changed files with 15 additions and 8 deletions
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -671,10 +671,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
pidfile = fopen(pidname, "w");
|
||||
if(pidfile) {
|
||||
int pid = (int)getpid();
|
||||
fprintf(pidfile, "%d\n", pid);
|
||||
long pid = (long)getpid();
|
||||
fprintf(pidfile, "%ld\n", pid);
|
||||
fclose(pidfile);
|
||||
logmsg("Wrote pid %d to %s", pid, pidname);
|
||||
logmsg("Wrote pid %ld to %s", pid, pidname);
|
||||
}
|
||||
else {
|
||||
error = ERRNO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue