Search:

Type: Posts; User: kahad

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    2,321

    It's printing (whenever I can get to print)...

    It's printing (whenever I can get to print) random lines.
  2. Replies
    3
    Views
    2,321

    Socket programming

    I'm trying to type a socket program that will allow me to transfer a file between a client and a server on two different computer, but it's not working. What's wrong with the code???

    Server

    ...
  3. Replies
    9
    Views
    3,531

    Updating code to most recent version. I think...

    Updating code to most recent version. I think the only porlbems I am having is that my alarm doesn't work and I can't seem to make it keep asking for a line after it prints out the first line.
    ...
  4. Replies
    9
    Views
    3,531

    Now it;s not typing back the text in capital...

    Now it;s not typing back the text in capital letters. It was doing that.

    Prompt.C


    #include <unistd.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <signal.h>
    #include <sys/wait.h>
  5. Replies
    9
    Views
    3,531

    That line is there to send the SIGTERM signal to...

    That line is there to send the SIGTERM signal to the child to kill it. My logic is that if the code gets to that function, I have enter either Control - D, Control - C, or Control - /.
  6. Replies
    9
    Views
    3,531

    Updating post with current code to reflect...

    Updating post with current code to reflect changes made.

    The thing I currently focusing on is the "If the user does not enter any line one minute after a prompt, the parent process should print a...
  7. Replies
    9
    Views
    3,531

    [QUOTE=Salem]> execl("Toupper", "Toupper", 0);...

    [QUOTE=Salem]> execl("Toupper", "Toupper", 0);
    > kill(getppid(), SIGUSR2);
    If the execl succeeds, then the kill will never happen.
    I thought that was needed to send the SIGUSR2 signal to...
  8. Replies
    9
    Views
    3,531

    Problem with signals

    I'm having trouble with two programs that work with pipes, processes, and signals. The first program, prompt.c, takes the path of the executable of the second program, toupper.c, as its command-line...
  9. Replies
    16
    Views
    2,952

    Ok, I get the point. I'll indent more. Now,...

    Ok, I get the point. I'll indent more.

    Now, where's that last ll fail CS306 coming from???
  10. Replies
    16
    Views
    2,952

    It only replaces the first occurance of pattern1...

    It only replaces the first occurance of pattern1 per line.

    And what's wrong with the indenting??? Everything is lined up perfectly.

    EDIT: Well, not everything. One } needed to be moved one...
  11. Replies
    16
    Views
    2,952

    Okay. It mostly works now. However, it's doing...

    Okay. It mostly works now. However, it's doing strange things if the outfile already exists. It's supposed to overwrite the original content. Here's an example of what its doing.

    Input text
    ...
  12. Replies
    5
    Views
    1,474

    Using Red Hat Linux as OS and C as language.

    Using Red Hat Linux as OS and C as language.
  13. Replies
    5
    Views
    1,474

    Testing if an argument is a directory

    How do you test if an argument passed is a directory???

    Expected argument:

    program name, filename, pattern 1, pattern 2

    Thanks

    Signed,
  14. Replies
    16
    Views
    2,952

    Ok, I got rid of that annoying segmentation...

    Ok, I got rid of that annoying segmentation fault. Now it's not writting anything.


    #include <unistd.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <sys/types.h>...
  15. Replies
    16
    Views
    2,952

    I changed some of the code again. Same...

    I changed some of the code again. Same segmentation fault error.


    #include <unistd.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <sys/types.h>
    #include <sys/stat.h>...
  16. Replies
    16
    Views
    2,952

    I need to use System calls with the outfile. ...

    I need to use System calls with the outfile.

    Changed the program a little:
    #include <unistd.h>
    #include <stdio.h>
    #include <string.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include...
  17. Replies
    16
    Views
    2,952

    What's wrong with my code here???

    Hello, everybody. Need help with this program. It's meant to take a pattern 1 and replace the first occurance in a string with pattern 2. The patterns are case sensitive. I keep getting a...
Results 1 to 17 of 17