Skip to content
Snippets Groups Projects
Commit 922f09c7 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

aix

parent 28d10ef9
No related branches found
No related tags found
No related merge requests found
/* $Id: Socket.cpp,v 1.7 2001-05-04 22:42:21 geuzaine Exp $ */ /* $Id: Socket.cpp,v 1.8 2001-05-07 07:25:04 geuzaine Exp $ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -88,7 +88,9 @@ int Socket_StartProgram(char *progname, char *sockname){ ...@@ -88,7 +88,9 @@ int Socket_StartProgram(char *progname, char *sockname){
#endif #endif
struct sockaddr_un addr, from; struct sockaddr_un addr, from;
char command[1000]; char command[1000];
#ifndef _AIX
fd_set rfds; fd_set rfds;
#endif
struct timeval tv; struct timeval tv;
int retval; int retval;
...@@ -121,12 +123,16 @@ int Socket_StartProgram(char *progname, char *sockname){ ...@@ -121,12 +123,16 @@ int Socket_StartProgram(char *progname, char *sockname){
if(listen(s, 20)) Msg(GERROR, "Socket listen failed"); if(listen(s, 20)) Msg(GERROR, "Socket listen failed");
/* Watch s to see when it has input. */ /* Watch s to see when it has input. */
FD_ZERO(&rfds);
FD_SET(s, &rfds);
/* Wait up to 2 seconds */ /* Wait up to 2 seconds */
tv.tv_sec = 2; tv.tv_sec = 2;
tv.tv_usec = 0; tv.tv_usec = 0;
#ifdef _AIX
/* select not done */
#else
FD_ZERO(&rfds);
FD_SET(s, &rfds);
retval = select(s+1, &rfds, NULL, NULL, &tv); retval = select(s+1, &rfds, NULL, NULL, &tv);
#endif
if(!retval){ if(!retval){
Msg(GERROR, "Socket listening timeout"); Msg(GERROR, "Socket listening timeout");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment