Re: Svante Signell 2016-02-20 <1455998664.2888.77.ca...@gmail.com> > On Sat, 2016-02-20 at 20:21 +0100, Christoph Berg wrote: > > Hi, > > > > Just a quick note here - the signal being sent here is from sbuild > > killing the process because it was stuck for four hours. The problem > > is that the sem syscall doesn't return. > > Iv'e come a little further: The error code is due to ETIMEDOUT as > expected. A new patch will probably follow tomorrow. Thanks!
Hi, I've done some digging as well: int main() { sem_t sem; struct timespec ts = {0, 0}; if (sem_init(&sem, 0, 0) == -1) { perror ("sem_init"); return -1; } if (sem_timedwait(&sem, &ts)==-1) { perror ("sem_timedwait"); return -2; } return 0; } sem_timedwait: Connection timed out >From what I got from the manpages, ts should probably be initialized as I've done above. What seems to work is to initialize the semaphore to 1, but then I have absolutely no experience with semaphores, nor what this test should actually test. Christoph -- c...@df7cb.de | http://www.df7cb.de/