Search:

Type: Posts; User: sbho

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,937

    typedef struct fs_dir_entry_t { char name[14];...

    typedef struct fs_dir_entry_t {
    char name[14]; /* 13-character name */
    unsigned short id; /* Index of DCB or FCB */
    } dir_entry_t;

    typedef struct fs_dcb_t { /* Directory Control Block */
    char...
  2. Replies
    3
    Views
    1,937

    Converting types while keeping same size.

    Hi all.
    I need urgent help. I have a deadline to meet and i am stuck on this stupid problem.
    Basically i am implementing my own virtual file system. I need to store data on it, raw data, about...
  3. Replies
    2
    Views
    1,938

    Alright, thank you. It seems i was trying...

    Alright, thank you.
    It seems i was trying without the escaping, and i was also trying just ff.c, thinking it should work since they're in the same forlder.
  4. Replies
    2
    Views
    1,938

    Reading from a file using fstream.

    Hi guys.

    Can you please tell me why this code prints garbage and loops forever.


    #include <iostream>
    #include <fstream>

    using namespace std;
  5. Replies
    40
    Views
    7,434

    It's working now...i have no clue why. But i...

    It's working now...i have no clue why.
    But i have a question: If i pass a pointer as a parameter to a function, can i free that pointer inside the function?
    Thanks.
  6. Replies
    40
    Views
    7,434

    Well i'm having a problem with the code. The 2nd...

    Well i'm having a problem with the code. The 2nd program is not waiting for the first program to send the input.

    pipe (p);
    pid1 = fork();
    if (pid1 == 0)
    {
    close (p[0]); // close the pipe...
  7. Replies
    40
    Views
    7,434

    But i can't. I need to use the ones specified in...

    But i can't. I need to use the ones specified in the assignment requirements.

    I think i'm gonna leave aside for a while. But back to the original topic, if i want to build: "ls | wc"
    Is it just a...
  8. Replies
    40
    Views
    7,434

    It is 2.3.3. I'm using Fedora core 3.

    It is 2.3.3. I'm using Fedora core 3.
  9. Replies
    5
    Views
    13,341

    You have unlink() as a system call.

    You have unlink() as a system call.
  10. Replies
    40
    Views
    7,434

    Here's my handler: void handle_INT () {...

    Here's my handler:

    void handle_INT ()
    {
    printf ("An interrupt has occured...\n");
    printf ("\n\n\n\n\n\n\n\n\n");
    longjmp (jmp, 1);
    }
    ok, a couple of things:
    - I want to reuse the old...
  11. Replies
    40
    Views
    7,434

    Crap! I'm sorry guys, but i'm assigning the...

    Crap!
    I'm sorry guys, but i'm assigning the returned value of signal to an integer. I had not noticed that.
    But i should assign it to a sighandler_t type right?
    I do this: sighandler_t sig;
    where...
  12. Replies
    40
    Views
    7,434

    It's simple. My code is similar to that one. I...

    It's simple. My code is similar to that one.
    I can't show it since it's huge, but it's the same thing.
    My handler is this:

    void handle_INT ()
    {
    printf ("An interrupt has occured...\n");...
  13. Replies
    40
    Views
    7,434

    gcc 3.4.2

    gcc 3.4.2
  14. Replies
    40
    Views
    7,434

    But then i get this: warning: assignment makes...

    But then i get this:
    warning: assignment makes integer from pointer without a cast
    My handler returns void and takes an int parameter.
  15. Replies
    40
    Views
    7,434

    Dunno! I am using sighandler_t, but i'm...

    Dunno!

    I am using sighandler_t, but i'm getting: undeclared (first use in this function).
    Isn't that type supposed to be in signal.h?
    WTF is goin' on??
  16. Replies
    40
    Views
    7,434

    Well i changed it to void, but i still get:...

    Well i changed it to void, but i still get:
    warning: assignment makes integer from pointer without a cast.
    I'm confused. iI'm totally new to this signals thing and it's driving me nutts.
  17. Replies
    40
    Views
    7,434

    This is from the tutorial: #include ...

    This is from the tutorial:

    #include <ctype.h>
    #include <stdio.h>
    #include <unistd.h>
    #include <signal.h>

    char *prog; /* program name -- always in argv[0] */
    char temp_filename[20]; ...
  18. Replies
    40
    Views
    7,434

    Oh and just one thing. I am working with...

    Oh and just one thing.
    I am working with signals, so i've defined my own signal handler, but can't type cast it to SignalHandler in the signal method (second parameter). I have included signal.h...
  19. Replies
    40
    Views
    7,434

    ok, i did a little reasearch and came up with a...

    ok, i did a little reasearch and came up with a solution.
    - For redirecting the input of a process to a file, such as: ls < text.txt
    I do dup (fd[0], 0). And then i run ls in child 1 and fork a new...
  20. Replies
    40
    Views
    7,434

    Handling I/O redirections in my shell.

    Hi all.
    This is my first post here, and i need urgent help with a programming assignment.
    I am working on an assignment which requires me to build a simple shell. My shell must handle simple...
Results 1 to 20 of 20