pthread_attr_init() returning errors

Canham, Timothy K (348C) timothy.k.canham@jpl.nasa.gov
Tue Apr 19 20:33:00 GMT 2016


I have some code to start a task that suddenly started failing. This is pretty mature code. Here is the code fragment with my added printf()

        pthread_attr_t att;
        int stat = pthread_attr_init(&att);
        if (stat != 0) {
            printf("pthread_attr_init: (%d)(%d): %s\n",stat,errno,strerror(stat));
            // return
        }

Here is the output:

pthread_attr_init: (16)(0): Device or resource busy

If I don't return in the if statement, the subsequent pthread_create() seems to work just fine.

Tim Canham
JPL Flight Software


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 246241 bytes
Desc: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160419/cb177e4b/attachment.obj>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list