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...