Thread: errno --perror() problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    Ive got another question -not related to errno or perror.
    Its about spawn and his families.

    I would like to display the content of a directory.
    First i thought lets keep it siple and use system("dir data");
    But that gives an output that is not very fancy.
    So i was thinking bout spawn (mayb that would do the thing for me). If im alrdy wrong here then excuse me.

    Anyway with spawn
    Code:
    /*main looks like this*/
    int main(int argc, char filename[]);
    
    /*then i make a call to a function in main*/
    int play(filename[]);
    /* in function play i do this*/
    spawnvp(P_WAIT,data,filename[] );
    /*But this gives me an error*/
    So my question is am i on the right track with spawn and all of his families?
    If so what can be wrong with that louzy piece of code?

    ::edit::
    checked the new faq section and there was a thing related to this, but still...
    Last edited by GanglyLamb; 04-01-2003 at 07:41 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to clean errno?
    By kotoko in forum C Programming
    Replies: 20
    Last Post: 05-14-2009, 12:21 PM
  2. errno function, error TLS/non TLS
    By fran.b in forum C Programming
    Replies: 13
    Last Post: 03-25-2009, 08:06 AM
  3. /usr/bin/ld: errno: TLS definition in /lib/libc.so.6
    By nasim751 in forum C Programming
    Replies: 4
    Last Post: 02-25-2009, 04:15 AM
  4. Replies: 8
    Last Post: 03-10-2008, 11:57 AM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM