#include "mcdp.h"

int select_wait(int fd, int sec) {
 struct timeval tv;
 fd_set se;

 FD_ZERO(&se);
 FD_SET(fd,&se);
 tv.tv_sec = sec;
 tv.tv_usec = 0;
 return select(fd+1,&se,NULL,NULL,&tv);
}

void mesg(int fd, char *msg) {
 write(fd,msg,str_len(msg));
}
