Search:

Type: Posts; User: und3rdog

Search: Search took 0.01 seconds.

  1. Thread: Semaphores

    by und3rdog
    Replies
    2
    Views
    6,702

    Semaphores

    Ok some of you might have done this already but this was a recent assignment and I want to see someone beat my score!

    The problem: 3 smokers each have 1 of 3 elements (rolling papers, tabacco,...
  2. Replies
    5
    Views
    13,424

    stat() might help you -luke

    stat() might help you
    -luke
  3. Replies
    2
    Views
    1,338

    something like this function(struct...

    something like this



    function(struct mystruct **a);
    /*if it will not change them put a const before struct*/


    not sure but that might work!
  4. Replies
    11
    Views
    3,346

    Wow, really I wish I could be as awesome a...

    Wow, really I wish I could be as awesome a contributor as you!(I read your *nix stuff in the FAQ section) *sigh* Now come on, I'm not whining about anything other than your manners. Hammer was nice...
  5. Replies
    11
    Views
    3,346

    Real problems or problems you consider real. A...

    Real problems or problems you consider real. A real problem is reading from a pipe! esp when there is Nilch on the man pages (BTW I'm not that new)! Help or don't, but don't be an ass!

    -Luke
  6. Replies
    11
    Views
    3,346

    Geez no need to get fiesty:eek: , I'm just...

    Geez no need to get fiesty:eek: , I'm just looking at your code! There is no good reference on READ() that I've found.

    -Luke
  7. Replies
    11
    Views
    3,346

    so if I try and read(stream, buffer, buffersize)...

    so if I try and read(stream, buffer, buffersize) from a pipe where the string in the pipe is of size 4 and the buffersize is 128? What happens, won't the read fail?

    -Luke
  8. Replies
    11
    Views
    3,346

    Well yeah I had to change the write, but I did...

    Well yeah I had to change the write, but I did write(fd[1], inputbuffer, strlen(inputbuffer)+1) won't that give me the string plus the NULL written to the pipe? BTW where did you pick this stuff up...
  9. Replies
    11
    Views
    3,346

    NEXT question. I'm in my scheduler program, how...

    NEXT question. I'm in my scheduler program, how do I get the string I just stuffed into the pipe out without knowing the size?

    -Luke
  10. Replies
    11
    Views
    3,346

    Ohh that would make sense that way no matter who...

    Ohh that would make sense that way no matter who I stick in the exec it will have access to the pipe? for this case it doesn't matter, but thanks for the tip!

    -Luke
  11. Replies
    11
    Views
    3,346

    thanks, what does dupe() do again? I thought it...

    thanks, what does dupe() do again? I thought it made an exact copy of the file descriptor? if I'm using the write(fd[1],inputbufer) i don't need it right?
  12. Replies
    11
    Views
    3,346

    So can I just move the fd[] outside of main? or...

    So can I just move the fd[] outside of main? or will I have to pass it in order to write to the pipe? Or like could I say write(1,inputbuf);?

    Thanks,

    -Luke
  13. Replies
    5
    Views
    1,832

    yeah it's like saying all 3 now point to what...

    yeah it's like saying all 3 now point to what student was pointing too!
  14. Replies
    5
    Views
    1,832

    use CODE tags

    use CODE tags
  15. Replies
    11
    Views
    3,346

    write() with pipe()

    I'm trying to put a buffer to the pipe but the PARSER() can't find the fd[] array? Do I have a scope issue? Any help.. BTW my first post :D



    #include <errno.h>
    #include <string.h>...
Results 1 to 15 of 15