Re: printf goes to serial port?

2009-01-04 Thread Bob van Loosen
Dave Korn wrote: Well... that requires editing every single printf in the whole program, no? It might be easier to just at the start of main() open the first three file descriptors, so that 0, 1 and 2 are allocated. If you open 0 from /dev/null in read mode and open 1 and 2 for write to

Re: printf goes to serial port?

2009-01-04 Thread Bob van Loosen
Hi, I was pointed to this discussion at the archives: http://www.cygwin.com/ml/cygwin/2008-12/msg00489.html I have a similar problem with my app, all printf statements go out the serial port. The problem is, I'm using the -mwindows flag to get a sort of "real" windows app, so no console output

Re: Memory leak with timer

2008-10-08 Thread Bob van Loosen
Larry Hall (Cygwin) wrote: Bob van Loosen wrote: Christopher Faylor wrote: On Wed, Oct 08, 2008 at 02:45:55AM +0200, Bob van Loosen wrote: Christopher Faylor wrote: This should be fixed in the next snapshot. If you are looking for a workaround, specifically set the

Re: Memory leak with timer

2008-10-08 Thread Bob van Loosen
Christopher Faylor wrote: On Wed, Oct 08, 2008 at 02:45:55AM +0200, Bob van Loosen wrote: Christopher Faylor wrote: This should be fixed in the next snapshot. If you are looking for a workaround, specifically set the sigev_notify_attributes to PTHREAD_CREATE_DETACHED. Thanks

Re: Memory leak with timer

2008-10-07 Thread Bob van Loosen
Christopher Faylor wrote: On Wed, Oct 08, 2008 at 12:08:52AM +0200, Bob van Loosen wrote: Hi all, When using a timer I seem to be getting a memory leak. It eats up about 8 kilobyte per second. Here's some example code: #include #include #include #include #include void no

Memory leak with timer

2008-10-07 Thread Bob van Loosen
Hi all, When using a timer I seem to be getting a memory leak. It eats up about 8 kilobyte per second. Here's some example code: #include #include #include #include #include void nothing(){} void Die(char *error){perror(error); exit(1);} int main() { struct itimerspec itimer; struc