Bug in c code calling bash code
Bug in c code calling bash code
ERROR: value too long for type character varying(16) Bad script ===================================== Code:
#include <stdio.h> |
Make a separate script containing the commands you want to run. Use popen to call this script.
|
Re: Bug in c code calling bash code
The line:
Code:
" updatemirrorhosts ", "w"); " */ Code:
" updatemirrorhosts ", "w"); |
Please oh please tell me this is not the whole C program.
|
To Hko
To Hko
I did fixed as you have suggested, but the error is still there. |
Seriously, if this is the whole program, don't do it this way .. just do it in a bash script. There's nothing but trouble to be gained from making a C program out of this.
|
I think the error comes from the (shell) command you execute. Not from the C-code. It compiles fine, right?
Can't verify that though, because I don't have the commandline utils "getdata", "suid-to", etc. installed, and I have no idea what they should. Try to execute the same line from whitin a shell, and find out wich program is causing the errors. |
Re: Bug in c code calling bash code
Quote:
Someone correct me if i'm wrong i don't usually critiqe other's code, i'm just waiting for a reply to my thread. |
Quote:
|
Quote:
|
Reply
OK, Lady and gentlemen, I won 't asked about it again.
Thank you all for your help. |
tho it should not worthy of being a C program, it still makes for an example of how to use popen(). Hell, its my 1st time seeing the function.
doing a man popen now. |
All times are GMT -5. The time now is 02:11 AM. |