If your program can run as root, you can use inb, outb,... but don't forget to use ioperm in the process/thread before accesing the memory. For more info, consult the man-pages.
Remark: Linux is not real-time either, so it is probably worthwhile to make a kernel-module. Check out "Linux...
The main issue is probably ftp, where you would have to do "help site" to find information on how to get the output on your system. C++ is only needed to interprete whatever you received.
In C++, make the command-file, start ftp (with fopen()) with the command-file and interprete and...
I can't see what is wrong with the first response.
The others don't give the terminating zero, so the results are not really strings.
Just my 2 cents...
Hello
Coming back to the original problem (fflush is for output).
I don't like scanf to read from the input, so I would suggest using fgets and sscanf.
The trick however is to look at the return-value of scanf or fgets because signals tend to interrupt system-calls, and thus acting like there...
Remark that for command->argv you must allocate memory for the array of arguments (or specify the maximum members of the array statically) and allocate memory for each argument.
Hope this helps,
Stefaan
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.