Re: errors regarding the code



On Tue, Jan 31, 2012 at 12:53:18PM +0530, manjunath rgm wrote:
> The shell script alone is working fine, but if I give more inputs through
> the text entry then it's not getting passed form Gtk program to shell
> program

The code does not contain anything that would fetch the contents of the
entry after editing or when the button was clicked.  So it always
executes system() with the initial content of the entry.

The compound command

    sh st1.sh 1-10;20-30;40-50;60-70

consists of 4 commands:

    sh st1.sh 1-10
    20-30
    40-50
    60-70

which is a nice illustration why you should not use system() but
instead a function from the g_spawn() family.

Also, using fixed-size buffers with no overflow checking and then asking
why something does not work for larger input is asking to be flamed...

Yeti



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]