Search:

Type: Posts; User: omega666

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    3,932

    is this true for a shell script In order for...

    is this true for a shell script


    In order for a file to be called from the command line and execute as a shell script on Unix, it must have a shebang (#!) line as one of its lines.


    I know it...
  2. Replies
    4
    Views
    3,932

    So with the right parameters you can make it wait...

    So with the right parameters you can make it wait until more than one are ready to read from?
  3. Replies
    4
    Views
    3,932

    help with pipe and socket in C

    Are these three statements true?
    The first one, i don't think its true because what sets up the pipes is the pipe() function.
    The second one, isn't pipes one way, but sockets 2 way?
    For the last...
  4. Replies
    12
    Views
    1,318

    if there were no space for the string, then how...

    if there were no space for the string, then how the the last printf statement print properly using the variable 'main->address' ?
    whats the difference between printing with
    h1.address and...
  5. Replies
    12
    Views
    1,318

    i still dont understand this isnt main->address...

    i still dont understand this
    isnt main->address the same memory as h1.address ?
  6. Replies
    12
    Views
    1,318

    if the h1.address is currupt because of fitting...

    if the h1.address is currupt because of fitting more then 1 chars into a 1 char space
    then why does the last print statement print properly
    main->address: 45 Elmo Drive
    isnt main->address the same...
  7. Replies
    12
    Views
    1,318

    how can that be a problem, since this is valid...

    how can that be a problem, since this is valid
    char *test="hello";
  8. Replies
    1
    Views
    19,889

    question about wait(NULL) in C

    if you use wait(NULL) in C, its supposed to wait until all child process's are completes first, but if u have a child that has another child does it wait until all these are exited? What if the first...
  9. Replies
    12
    Views
    1,318

    help with pointers and structs in C

    in this code


    #include <stdio.h>

    struct hospital {
    int num_beds;
    char code;
    char *address;
    };
  10. how to open files and print line by line in shell

    i am using this


    #!/usr/bin/env bash

    curdir=`pwd`
    while read line; do
    printf $line
    done < "test"
    cd $curdir
  11. yeah its linux, and i want to end the child...

    yeah its linux, and i want to end the child because of an infinite loop, so it would really help if you can provide an example of how to do the signal code.

    As well if you do know, i am trying to...
  12. when parent process close, how to close the child?

    can someone provide an example, where if the parent process quits for any reason, then the child process will also close?
  13. Replies
    4
    Views
    1,191

    so what happens if it skips the accept, in a...

    so what happens if it skips the accept, in a standard server file, because of non-blocking? will an error occur?

    i added
    fcntl(socket_fd, F_SETFL, O_NONBLOCK);
    to the top, but still it hangs on...
  14. Replies
    4
    Views
    1,191

    so on this page Beej's Guide to Network...

    so on this page
    Beej's Guide to Network Programming
    i click
    select()
    and
    socket()
    ?

    also i dont see
    non blocking sockets.
  15. Replies
    4
    Views
    1,191

    help with time and accept function in C

    i have a server client program where the server can connect with many clients, in the server it uses select function and accept. the program is about auctioning items, so i have it so after a certain...
  16. Replies
    0
    Views
    2,114

    help with select function in C

    nvm i got it now...
  17. Help with time in C, how do you even do this?

    in my program i want to get the current time when the program starts, then be able to get the current time anytime later, I don't care how the format of the time is, but the thing is i want to be...
  18. Replies
    6
    Views
    2,989

    ok delete this thread then, since the other is...

    ok delete this thread then, since the other is fine
  19. typedef struct item_list { char *name; char...

    typedef struct item_list {
    char *name;
    char *number;
    char *current_price;
    char *high_bid;
    struct item_list *next;
    } item;
  20. Replies
    6
    Views
    2,989

    i changed it again to check=0;...

    i changed it again to



    check=0;
    item *ptr = NULL;
    for(ptr = item_list; ptr != NULL; ptr = ptr->next) {
    if (strcmp(tmp_buffer1, ptr->number)==0) {
    if...
  21. Replies
    6
    Views
    2,989

    i changed it to item *node = NULL;...

    i changed it to


    item *node = NULL;
    for(node = item_list; node != NULL; node = node->next) {
    if (strcmp(node->number,tmp_buffer1)==0 &&...
  22. Replies
    6
    Views
    2,989

    help with adding item to linked list in C

    shift(buffer,4);
    tmp_buffer1 = malloc(strlen(buffer) * sizeof(char));
    get_first_num(buffer,tmp_buffer1);
    check = strlen(tmp_buffer1)+1;
    shift(buffer,check);
    check=0; item_num=0;...
  23. how to check if string exists in a struct linked list?

    can someone provide an example of a struct linked list, where it has strings as its values, and then how do I check if a specific string (say called buffer) exists in the list of structs?

    i dont...
  24. Replies
    2
    Views
    1,273

    nvm i think i got it

    nvm i think i got it
  25. Replies
    2
    Views
    1,273

    help with linked list in C

    in my code , i have trouble adding strings to list, and checking if they exist
    before adding to the list i check if it already exists, if it does not, then i add it, but the problem is when i add...
Results 1 to 25 of 29
Page 1 of 2 1 2