I'm using an RH Linux. Could you point me some code ?
Thanks a lot,
Type: Posts; User: groorj
I'm using an RH Linux. Could you point me some code ?
Thanks a lot,
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...
Could any one give me an example, even if a simple one.
Thanks,
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];
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...
Hey Salem and orbitz, thanks a lot for the solution !
I've made some coding and now it works just fine !!!
Thanks again,
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...
Hey Quzah, thanks alot for the help !
Does anyone know how I can store the Built date like apache does:
I'm using RH Linux with gcc !
Thanks in advance,
#include <stdio.h>
#include <time.h>
main() {
char date_Ymd[8+1];
struct tm *gsapdh;
time_t gsaintps;
gsaintps=time(NULL);
gsapdh =...
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...
Salem, Thank you one more time for your help ! Its very simple:
setuid(userid);
Thanks,
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...
...
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...
Hello All,
I have the following code:
if(f_peri) {
c = 0;
k = 0;
...
Hey, thanks alot tjohnsson.
It worked !
Well it didnīt realy work !
while ( sscanf(ptr, "%50[^ ]%*s%n", field, &n) == 1 )
It produces the following:
field[0]: [Hello]
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...
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...
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() {
Hi iain,
I've tryed getwd but it has the same result as getcwd. My code:
#include <unistd.h>
#include <limits.h>
main()
Ok anonytmouse, understood ! I'll try argv[0] for now and think in a better solution for the next versions !
Thanks for the help !
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()
Realy a dont know how I was missing this ! :)
Anyway, thanks alot for the help ! My code now is:
#include <time.h>
main()
{
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:...