473,320 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem - program exited with code 0377

Hi? My name is Seo Jae Ick.

I have a problem with running a program on Linux RedHat 8.0.
GDB have reported this,

program exited with code 0377

I think, this statement comes when

1) explicit call in process exit(-1) <- 0377(octet) = -1(decimal)
2) return -1 in main function

(any other case exists?)

I have searched exit(-1)in whole codes, but not exists.
And I changed main function's return value to another number (like 128)
Finally, I added exit handler, ExitHandler by calling atexit(ExitHandler)

But, gdb reports same statement(program exited with code 0377)
and, breakpoint in ExitHandler skipped.

Somebody knows the reason of this problem?
Thanks in advance!

Seo Jae Ick
Nov 14 '05 #1
5 41981
On 14 Feb 2004 20:31:31 -0800, in comp.lang.c , se*******@hotmail.com (Seo
Jae Ick) wrote:
Hi? My name is Seo Jae Ick.

I have a problem with running a program on Linux RedHat 8.0.
GDB have reported this,

program exited with code 0377

I think, this statement comes when

1) explicit call in process exit(-1) <- 0377(octet) = -1(decimal)
2) return -1 in main function

(any other case exists?)
your program crashed, and returned garbage to teh OS, which decided to
interpret it as meaning -1.
Somebody knows the reason of this problem?


You have a bug in your program. You need to find the bug, and fix it.
Narrow down the location, post a (small) piece of code that causes the
crash, and maybe someone here can help fix it.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #2
Mark McIntyre <ma**********@spamcop.net> wrote in message news:<41********************************@4ax.com>. ..
On 14 Feb 2004 20:31:31 -0800, in comp.lang.c , se*******@hotmail.com (Seo
Jae Ick) wrote:
Hi? My name is Seo Jae Ick.

I have a problem with running a program on Linux RedHat 8.0.
GDB have reported this,

program exited with code 0377

I think, this statement comes when

1) explicit call in process exit(-1) <- 0377(octet) = -1(decimal)
2) return -1 in main function

(any other case exists?)


your program crashed, and returned garbage to teh OS, which decided to
interpret it as meaning -1.
Somebody knows the reason of this problem?


You have a bug in your program. You need to find the bug, and fix it.
Narrow down the location, post a (small) piece of code that causes the
crash, and maybe someone here can help fix it.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


If my program crashed, isn't signal SIGSEGV sent to that program?

SIGSEGV didn't be caughed.
Thank you for your kind advice, Mark!
Nov 14 '05 #3
On 15 Feb 2004 07:50:52 -0800, in comp.lang.c , se*******@hotmail.com (Seo
Jae Ick) wrote:
Mark McIntyre <ma**********@spamcop.net> wrote in message news:<41********************************@4ax.com>. ..
On 14 Feb 2004 20:31:31 -0800, in comp.lang.c , se*******@hotmail.com (Seo
Jae Ick) wrote:
>Hi? My name is Seo Jae Ick.
>
>I have a problem with running a program on Linux RedHat 8.0.
>GDB have reported this,
>
>program exited with code 0377
> .... >Somebody knows the reason of this problem?
You have a bug in your program.

....If my program crashed, isn't signal SIGSEGV sent to that program?


Possibly. The behavioru of the OS when you have a bug is not defined by C.

Its equally possible that the first thingf that gdb does when you load it
is look for a core dump, and tell you what the core dumped for.

But if you /reeally/ want to find out, you need to ask in a group
specialising in whatever OS and Compiler you're using.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #4
Mark McIntyre <ma**********@spamcop.net> wrote in message news:<hm********************************@4ax.com>. ..
On 15 Feb 2004 07:50:52 -0800, in comp.lang.c , se*******@hotmail.com (Seo
Jae Ick) wrote:
Mark McIntyre <ma**********@spamcop.net> wrote in message news:<41********************************@4ax.com>. ..
On 14 Feb 2004 20:31:31 -0800, in comp.lang.c , se*******@hotmail.com (Seo
Jae Ick) wrote:

>Hi? My name is Seo Jae Ick.
>
>I have a problem with running a program on Linux RedHat 8.0.
>GDB have reported this,
>
>program exited with code 0377
> ... >Somebody knows the reason of this problem?

You have a bug in your program.

...
If my program crashed, isn't signal SIGSEGV sent to that program?


Possibly. The behavioru of the OS when you have a bug is not defined by C.

Its equally possible that the first thingf that gdb does when you load it
is look for a core dump, and tell you what the core dumped for.

But if you /reeally/ want to find out, you need to ask in a group
specialising in whatever OS and Compiler you're using.


Hello, Mark!

Here is my system's information

OS: RedHat Linux 8.0 (Psyche) Kernel(2.4.18-14smp)
Compiler: gcc 3.2-7
Debugger: gdb-5.2.1-4

Though I can't fix this problem still, thank you for your help.
Seo Jae Ick
Nov 14 '05 #5
Mark McIntyre <ma**********@spamcop.net> wrote in message news:<hm********************************@4ax.com>. ..
On 15 Feb 2004 07:50:52 -0800, in comp.lang.c , se*******@hotmail.com (Seo
Jae Ick) wrote:
Mark McIntyre <ma**********@spamcop.net> wrote in message news:<41********************************@4ax.com>. ..
On 14 Feb 2004 20:31:31 -0800, in comp.lang.c , se*******@hotmail.com (Seo
Jae Ick) wrote:

>Hi? My name is Seo Jae Ick.
>
>I have a problem with running a program on Linux RedHat 8.0.
>GDB have reported this,
>
>program exited with code 0377
> ... >Somebody knows the reason of this problem?

You have a bug in your program.

...
If my program crashed, isn't signal SIGSEGV sent to that program?


Possibly. The behavioru of the OS when you have a bug is not defined by C.

Its equally possible that the first thingf that gdb does when you load it
is look for a core dump, and tell you what the core dumped for.

But if you /reeally/ want to find out, you need to ask in a group
specialising in whatever OS and Compiler you're using.


Ah, I misunderstood your comment.
I'll try to get answer from linux os newsgroup.
(of course try to fix problem by myself also)

Have a nice day!
Seo Jae Ick
Nov 14 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: fastwings | last post by:
mm the code //////makemenu.h//// class menu { public: int op; pmenu(int op,int sub = 0) { switch op {
12
by: 1111111111 | last post by:
I am writing a program that tells users to enter 2 sides of a rectangle. From that the program will output a drwaing of the rectangle using "*"'s... Here is my problem. Say I enter 5 and 10 for...
2
by: Piyu | last post by:
Hi I have problem with javascript code. Following is my code <div class="col1"><input name="loginName" type="text" class="txtbox" value="collins_sd@hotmail.com"></div> <div...
5
by: Raj | last post by:
Following is a code to replace blanks in entered string with adequate number of tabs & spacings as required. I've taken the width of tab as 5 characters here. The problem that occurs here is for...
0
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, i m having a problem with this code. Actually i want to refresh connection by closing and opening it. But the problem is that it do well when i update once but when i update it once more...
10
by: paul814 | last post by:
I am having a bit of a problem with some code....can someone give me some suggestions? Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\production \date2.php on line 28 line 28 is...
1
thatos
by: thatos | last post by:
I was requested to make a code for the following question write a program that will compute the frequency that the 13th of each month lands on sunday,monday,tuesday,wednesday,thursday,friday and...
18
by: ramu | last post by:
Hi, Is there any problem with the following code? Regards char *func() { char c; return (&c); }
2
by: fury30 | last post by:
this is the program as below and now what i need to do is add the following to it but i am not able to get how to do it # futval.py # A program to compute the value of an investment # ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.