Search:

Type: Posts; User: Zarniwoop

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    3,002

    Linux programming reference manual

    Hello!

    I'm wondering if there is any Linux reference manual similar to the once for Amiga. For Amiga there was a series of books called "Amiga ROM Kernel Reference Manual", where I mainly used the...
  2. Replies
    7
    Views
    1,050

    Maybe I should have written the explanation above...

    Maybe I should have written the explanation above the code instead of below, so I'll write it again, on it's own:

    As I wrote above, I get a segmentation fault when I try to add the third string....
  3. Replies
    7
    Views
    1,050

    Hello again! It seems that I have received a...

    Hello again!

    It seems that I have received a problem when I added functionality using the above. I now created a function for adding a new "processes" to the array, but I'm getting segmentation...
  4. Replies
    7
    Views
    1,050

    Thanks to quzah's example I found the bug. I...

    Thanks to quzah's example I found the bug. I don't know if I did things right from the start, but I discovered something that it seems everyone missed. I try to read processes[x].pid as a string in...
  5. Replies
    7
    Views
    1,050

    Thanks, but it doesn't work here for some reason....

    Thanks, but it doesn't work here for some reason. Now I'm doing (in my program I will use variables for the string and the size of it). I've tried both with the number of chars, and with number of...
  6. I don't understand how you mean? What I want...

    I don't understand how you mean?

    What I want to do is the following. I have created a shell, and when the user start e.g. emacs using e.g. "emacs test.c &", he/she can continue using the shell....
  7. Replies
    7
    Views
    1,050

    Pointer to struct

    Not very explaining title maybe, but don't know how to explain shortly.

    I'm trying to create an array of structs, but as I'm not very good at structs so I'm getting some problems. What I want to...
  8. Thank you for all the responses. itsme86: How...

    Thank you for all the responses.

    itsme86: How do I detect "SIGCHLD" if I don't wait? Or can I check for incoming signals regularly? I assume that would be useful for ignoring Ctrl+C also?
  9. How do I stop child processes from becoming defunct?

    Hello!

    I'm writing a shell and by now it works pretty well, even though I still haven't managed to incorporate ncurses/termios yet. But when I run a program from my shell using "&", and shutdown...
  10. Replies
    5
    Views
    1,563

    Hi! Thanks for the quick answer. It turns out...

    Hi!

    Thanks for the quick answer. It turns out that it is multi-byte sequences, first 91, then 65-68.

    I'm not sure how I will do now, but it might be better to use the function you suggest. It...
  11. Replies
    5
    Views
    1,563

    How to identify arrow-chars?

    Hi!

    I'm trying to write my own shell, and I've got it working pretty well now. But I want to add options like tab-completion, and input-buffer (i.e. so you can use the arrow characters to reuse...
  12. Replies
    2
    Views
    4,540

    Multiple clients to "internet" server

    Hello!

    I am trying to create a sort of chat program as an exercise. I have an example from a book showing how to create a connectionless server and a connectionless client with internet sockets,...
  13. Replies
    1
    Views
    8,422

    Recreating stdout/stdin

    Hello!

    For a program I wrote I learned how to redirect stdout from one program to stdin of another program by using dup() etc. Now I am writing my own shell and it's going pretty well (although I...
  14. Replies
    19
    Views
    15,718

    Hi! I usually do it as follows. It might look...

    Hi!

    I usually do it as follows. It might look a bit complicated, but I works for me:



    char* tmp=(char *)malloc(50*sizeof(char)); // Room for 50 chars. Set to what you want, one
    ...
  15. Replies
    6
    Views
    1,940

    Thank you! The example on that page was great....

    Thank you!

    The example on that page was great. It does exactly what I wanted in my program so I'll use that.

    The reason I want to use a boolean is that the tempfile is used to store information...
  16. Replies
    5
    Views
    1,945

    I like the book "Interprocess communication in...

    I like the book "Interprocess communication in Unix - The nooks and crannies" by John Shapley Gray. It covers everything about sockets I'd say, and the examples are in C.

    Examples of contents is...
  17. Replies
    6
    Views
    1,940

    Sorry, the function was sighandler (it has to...

    Sorry, the function was sighandler (it has to work in Unix aswell as Linux)
  18. Replies
    6
    Views
    1,940

    Signal handling

    Hello again!

    Unfortunately I encountered problems after finding my function.

    What I want to do is to handle the situation where the user tries to end the program by "Ctrl-C" so a temp-file is...
  19. Replies
    4
    Views
    1,633

    Great! That worked! Thank you very much :-)

    Great! That worked!

    Thank you very much :-)
  20. Replies
    4
    Views
    1,633

    Thanks, that helps me to find the names of the...

    Thanks, that helps me to find the names of the syscalls, but I still don't have information on how they work.

    At work I'm using Ubuntu 7.10 and there it works, but not in Xubuntu 8.10.
  21. Replies
    4
    Views
    1,633

    Syscall documenation in Xubuntu 8.04

    Hello!

    I recently installed Xubuntu 8.04, among other thing for programming c, but now I have discovered that the manual for C (section 2) seems to be missing. "man -s2 intro" works, but "man -s2...
  22. Replies
    4
    Views
    2,645

    Thank you guys. I'm sorry about the FAQ, I looked...

    Thank you guys. I'm sorry about the FAQ, I looked there but I didn't find the entry vart is referring to.

    I think I'll go with the termcap library then, if other shells use it. Thanks for the tip.
  23. Replies
    12
    Views
    3,664

    If you want to read until the end of input, when...

    If you want to read until the end of input, when you are reading from stdin (i.e. if the user is typing). You want to look for end of line, or from a string (char-array) a NULL-value (0).

    If you...
  24. Replies
    3
    Views
    2,060

    Never mind. I got it working. It doesn't look to...

    Never mind. I got it working. It doesn't look to nice, but it works now :-)
  25. Replies
    3
    Views
    2,060

    Bubblesort with special characters

    Based on the discussion "Problems sorting a string" I did my own bubblesort-function. It works fine except for the three Swedish characters "едц" (not sure if these will be visible depending on you...
Results 1 to 25 of 40
Page 1 of 2 1 2