Search:

Type: Posts; User: groorj

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,071

    I'm using an RH Linux. Could you point me some...

    I'm using an RH Linux. Could you point me some code ?

    Thanks a lot,
  2. Replies
    3
    Views
    1,071

    N requests per second

    Hello All,

    Can anyone give me some intro infos on how I could:

    Execute a certain task on a N times per second ?? I would like to run a task at a defined number (N) of times per second.

    Any...
  3. Replies
    3
    Views
    1,503

    Could any one give me an example, even if a...

    Could any one give me an example, even if a simple one.

    Thanks,
  4. Replies
    3
    Views
    1,503

    group struct info

    Hello All,

    I have some data into an struct and I would like to group those information. My struct looks like this:



    struct MyStruct data[MAX];

    struct MyStruct {
    char date[20];
  5. Replies
    5
    Views
    9,987

    Hello Again, I've found a problem today with...

    Hello Again,

    I've found a problem today with this implemantation. My program dies allways after 108 seconds. I've done this:

    At main():


    struct sigaction act;
    /* Assign sig_chld as...
  6. Replies
    5
    Views
    9,987

    Hey Salem and orbitz, thanks a lot for the...

    Hey Salem and orbitz, thanks a lot for the solution !

    I've made some coding and now it works just fine !!!


    Thanks again,
  7. Replies
    5
    Views
    9,987

    execv and defunct process

    Hello All,

    I have made a small program to execute an external program using execv. First I make some sanity check's like if the file exist then I execute the program (by root) doing an setuid to...
  8. Thread: Built date

    by groorj
    Replies
    2
    Views
    1,192

    Hey Quzah, thanks alot for the help !

    Hey Quzah, thanks alot for the help !
  9. Thread: Built date

    by groorj
    Replies
    2
    Views
    1,192

    Built date

    Does anyone know how I can store the Built date like apache does:



    I'm using RH Linux with gcc !

    Thanks in advance,
  10. #include #include main() {...

    #include <stdio.h>
    #include <time.h>

    main() {
    char date_Ymd[8+1];
    struct tm *gsapdh;
    time_t gsaintps;
    gsaintps=time(NULL);
    gsapdh =...
  11. Replies
    2
    Views
    2,524

    And how to on *UX env ?

    Hello All,

    I'll use the same post to make interested people search easier in the future.

    Does any one know how to get the serial from a *UX box ? And how about if I have a raid device ?

    I'm...
  12. Replies
    2
    Views
    1,554

    Salem, Thank you one more time for your help !...

    Salem, Thank you one more time for your help ! Its very simple:



    setuid(userid);


    Thanks,
  13. Replies
    2
    Views
    1,554

    Execute prog as other user

    Hello All,

    I'm writing a program that will execute external programs under a linux machine. This program will run as root and each external program must be run by the user that is calling it...
    ...
  14. Replies
    3
    Views
    1,786

    Hello Sinkula, Thanks for the tip ! It now...

    Hello Sinkula,

    Thanks for the tip !

    It now works inside the while, only the numbers on the file are printed. I think I've found the error... it was not at sscanf I think that is a problem with...
  15. Replies
    3
    Views
    1,786

    sscanf and memory allocation

    Hello All,

    I have the following code:



    if(f_peri) {
    c = 0;
    k = 0;
    ...
  16. Thread: Split line

    by groorj
    Replies
    8
    Views
    5,049

    Hey, thanks alot tjohnsson. It worked !

    Hey, thanks alot tjohnsson.

    It worked !
  17. Thread: Split line

    by groorj
    Replies
    8
    Views
    5,049

    Well it didnīt realy work ! while (...

    Well it didnīt realy work !



    while ( sscanf(ptr, "%50[^ ]%*s%n", field, &n) == 1 )


    It produces the following:
    field[0]: [Hello]
  18. Thread: Split line

    by groorj
    Replies
    8
    Views
    5,049

    Well, I think Iīve found a better way of doing...

    Well, I think Iīve found a better way of doing what I need. Iīve done this:



    #include <stdio.h>
    #include <string.h>

    main() {
    //char line[]="Hello World !!";
    //char...
  19. Thread: Split line

    by groorj
    Replies
    8
    Views
    5,049

    Split line

    Hello All,


    I'm trying to split a line like this:

    15 /usr/bin/php /html/echo.php 8

    I split paramaters using space char as the delimiter. I need to put the first par (15) and a variable and...
  20. Thread: Concatenation ?

    by groorj
    Replies
    8
    Views
    2,004

    strcat(param1 , param2); strcat will allways...

    strcat(param1 , param2);

    strcat will allways concat param2 to param1 ! Depending on what you are trying to do you can also use sprintf.



    #include <stdio.h>
    #include <string.h>

    main() {
  21. Replies
    5
    Views
    1,084

    Hi iain, I've tryed getwd but it has the same...

    Hi iain,

    I've tryed getwd but it has the same result as getcwd. My code:



    #include <unistd.h>
    #include <limits.h>

    main()
  22. Replies
    5
    Views
    1,084

    Ok anonytmouse, understood ! I'll try argv[0] for...

    Ok anonytmouse, understood ! I'll try argv[0] for now and think in a better solution for the next versions !

    Thanks for the help !
  23. Replies
    5
    Views
    1,084

    Dir where application resides

    Hello All,

    Im trying to get the working directory where my application resides. My actual code uses getcwd.



    #include <unistd.h>
    #include <limits.h>

    main()
  24. Replies
    2
    Views
    1,256

    Realy a dont know how I was missing this ! :) ...

    Realy a dont know how I was missing this ! :)

    Anyway, thanks alot for the help ! My code now is:



    #include <time.h>

    main()
    {
  25. Replies
    2
    Views
    1,256

    Date manipulation

    Hello All,

    Once more I'm asking for some help from all gurus. I've searched for some help in the history but with now sucess.

    I'm trying to open a file named file_YYYYMMDD.txt.
    Ex:...
Results 1 to 25 of 41
Page 1 of 2 1 2