diff options
author | mfe <mfe@openoffice.org> | 2000-12-14 16:28:26 +0000 |
---|---|---|
committer | mfe <mfe@openoffice.org> | 2000-12-14 16:28:26 +0000 |
commit | 782a5108bdf21e849510a6a18b11574b1226bc38 (patch) | |
tree | ba0fec0d204944276d60b19baa2a3a38956c8237 /sal/osl | |
parent | c5cffd35ac7a1ceadee7c0b9a0177e0b66336437 (diff) |
#80278# : replaced wait with waitpid after fork
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/unx/socket.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c index 840d461775e3..f4d44fcdccc7 100644 --- a/sal/osl/unx/socket.c +++ b/sal/osl/unx/socket.c @@ -2,9 +2,9 @@ * * $RCSfile: socket.c,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: mhu $ $Date: 2000-12-14 15:19:00 $ + * last change: $Author: mfe $ $Date: 2000-12-14 17:28:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -628,7 +628,7 @@ oslSocketAddr SAL_CALL osl_createInetBroadcastAddr ( nAddr = htonl(nAddr); } - pAddr = malloc (sizeof(struct sockaddr_in)); + pAddr = (struct sockaddr_in*) malloc (sizeof(struct sockaddr_in)); if (pAddr) { pAddr->sin_family = FAMILY_TO_NATIVE(osl_Socket_FamilyInet); @@ -806,6 +806,7 @@ static sal_Bool _osl_getDomainName (sal_Char *buffer, sal_Int32 bufsiz) if (pipe (p) == 0) { pid_t pid; + int nStatus; pid = fork(); if (pid == 0) @@ -844,7 +845,8 @@ static sal_Bool _osl_getDomainName (sal_Char *buffer, sal_Int32 bufsiz) close (p[0]); close (p[1]); } - wait (NULL); + + waitpid (pid, &nStatus, 0); } return (result); } @@ -1426,7 +1428,9 @@ oslSocketResult SAL_CALL osl_psz_getLocalHostname ( if ((pStr = osl_psz_getHostnameOfHostAddr(Addr)) != NULL) { +#if 0 /* OBSOLETE */ sal_Char* pChr; +#endif /* OBSOLETE */ strcpy(LocalHostname, pStr); #if 0 /* OBSOLETE */ |