Author Topic: Process terminated with status 255  (Read 27108 times)

silverzhao

  • Guest
Process terminated with status 255
« on: November 30, 2010, 11:19:09 am »
Hello, I have a problems here: whenever I run a program, even just a simple "HelloWorld", it will say "Process terminated with status 255" as the red line shows.I wonder why it is not 0 . Thank you!
Well, I'm using codeblocks svn 6840 on ubuntu 10.10, and in "settings --> Environmet", I use "gnome-terminal -t $TITLE -x".
« Last Edit: November 30, 2010, 11:21:09 am by silverzhao »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

silverzhao

  • Guest
Re: Process terminated with status 255
« Reply #2 on: December 01, 2010, 06:30:42 am »
http://forums.codeblocks.org/index.php/topic,13743.msg92605.html#msg92605
Thank you for your kind reply, but I still do not quite understand it. I have xterm installed, but I prefer gnome-terminal. So is there any way that I can change return value 255 to 0? Thank you!

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Process terminated with status 255
« Reply #3 on: December 01, 2010, 08:07:40 am »
Does it work from a console ?

I use gnome-terminal on my system and have no such issues.

silverzhao

  • Guest
Re: Process terminated with status 255
« Reply #4 on: December 10, 2010, 07:59:49 am »
Does it work from a console ?

I use gnome-terminal on my system and have no such issues.

I've just tried it. If I start CodeBlocks in gnome-terminal,  it works well, no more the annoying red line! But if I open it from "Applications" --> "Programming" --> "Code::Blocks IDE", the annoying red line comes back again! So why is this? Thank you!

silverzhao

  • Guest
Re: Process terminated with status 255
« Reply #5 on: December 17, 2010, 03:03:16 pm »
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?

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: Process terminated with status 255
« Reply #6 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)
« Last Edit: February 11, 2011, 09:08:16 am by wangdong1226 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Process terminated with status 255
« Reply #7 on: February 11, 2011, 09:37:12 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)

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

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.

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: Process terminated with status 255
« Reply #8 on: February 11, 2011, 12:39:00 pm »
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?
« Last Edit: February 11, 2011, 12:41:04 pm by wangdong1226 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Process terminated with status 255
« Reply #9 on: February 11, 2011, 12:45:55 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?

Unfortunately yes !