User forums > Using Code::Blocks
Process terminated with status 255
silverzhao:
I've found something interesting: if I open the gnome-terminal before executing the program in codeblocks, it will not show the red line any more. But once I close the gnome-terminal and execute the program again, the annoying red line comes back at once! Is there anything different here?
wangdong1226:
Here is a 'solution':
=========
Here's the command I use:
Code:
--------
gnome-terminal --disable-factory -t $TITLE -x
--------
The "--disable-factory" argument runs gnome-terminal in it's own process, apart from other gnome-terminal processes you have running. Without it gnome-terminal will return 255 upon exit, unless you have another gnome-terminal already open.
This is still only a partial solution, since gnome-terminal will return 0 to Code::Blocks, regardless of what your program returns... If anyone has a solution to this problem, please let us know.
=========
This solution quoted from: http://www1.ubuntuforums.org/showthread.php?p=10251821
And you can make a little bit change:
--------
gnome-terminal --disable-factory --hide-menubar -t $TITLE -x
--------
or
--------
gnome-terminal --disable-factory --hide-menubar -t $TITLE -e
--------
(maybe can not works)
Jenna:
--- Quote from: wangdong1226 on February 11, 2011, 09:05:35 am ---Here is a 'solution':
=========
Here's the command I use:
Code:
--------
gnome-terminal --disable-factory -t $TITLE -x
--------
The "--disable-factory" argument runs gnome-terminal in it's own process, apart from other gnome-terminal processes you have running. Without it gnome-terminal will return 255 upon exit, unless you have another gnome-terminal already open.
This is still only a partial solution, since gnome-terminal will return 0 to Code::Blocks, regardless of what your program returns... If anyone has a solution to this problem, please let us know.
=========
This solution quoted from: http://www1.ubuntuforums.org/showthread.php?p=10251821
And you can make a little bit change:
--------
gnome-terminal --disable-factory --hide-menubar -t $TITLE -x
--------
or
--------
gnome-terminal --disable-factory --hide-menubar -t $TITLE -e
--------
(maybe can not works)
--- End quote ---
For me it works without --disable-factory, but this might be due to my gnome settings.
--- Code: ---gnome-terminal --disable-factory --hide-menubar -t $TITLE -e
--- End code ---
does not work, because it needs quotation around the command after the -e, otherwise only the first parameter is used as command and that can not work (in almost any cases), -x uses the remaining parameters as command.
wangdong1226:
or if want to resize the size of the window, can do like this:
gnome-terminal --disable-factory --hide-menubar --geometry 70x24+50+0 -t $TITLE -x
70x24: size of the window;
+50+0: window position in screen.
Dear Jens,
does "This is still only a partial solution, since gnome-terminal will return 0 to Code::Blocks, regardless of what your program returns..." will happen in your system?
Jenna:
--- Quote from: wangdong1226 on February 11, 2011, 12:39:00 pm ---Dear Jens,
does "This is still only a partial solution, since gnome-terminal will return 0 to Code::Blocks, regardless of what your program returns..." will happen in your system?
--- End quote ---
Unfortunately yes !
Navigation
[0] Message Index
[*] Previous page
Go to full version