CYGWIN executable crash ??


 
Thread Tools Search this Thread
Top Forums Programming CYGWIN executable crash ??
# 1  
Old 05-31-2012
CYGWIN executable crash ??

Ok I feel kind of stupid asking since it's been a while since I used an UNIX system but here goes. I recently installed the full CYGWIN on my Windows 7 machine. Seem like a nice package. So to test it out I did the basic hello world deal. It compiles just fine. But when I run it it crashed Smilie. So I ran it in gdb and got an error code of 012. Can't find what that means. I need to be able to run programs for a network class I'm taking.

my compile string is the basic:

gcc hello.c -o hello.exe
then I:

run hello.exe

crash Smilie

Any thoughts ???

Last edited by Scott; 05-31-2012 at 12:03 PM.. Reason: Moved thread. This has nothing to do with Unix
# 2  
Old 05-31-2012
Without seeing the code I can't possibly say why it crashed. Though you might try ./hello.exe instead of run hello.exe in case you meant that literally.
# 3  
Old 05-31-2012
Just your basic hello word code.

#include <stdio.h>

main()
{
printf("Hello, world\n");
}

Nothing fancy. I need to check my PATH. The dir where the code resides may not be there. Could be an issue. Just wich I could find what the gdb exit code of 012 is ... I'll also try your suggestions.
# 4  
Old 05-31-2012
PATH being wrong would mean it doesn't work, not that it crashes.

That can't possibly be your code by the way, since you've forgotten to specify main's return value and such. Post your actual, unmodified code, word for word, letter for letter, keystroke for keystroke.
# 5  
Old 05-31-2012
Actually that is my code. It's the same hello world I've used for years straight out of my Kernighan/Ritchie book ...

---------- Post updated at 11:57 AM ---------- Previous update was at 11:00 AM ----------

Added a return 0 and it doesn't crash. Been many years since I ran this. Never had to have a return value on it. Thanks for the tip.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cygwin executable shell scripts

Hello, Cygwin will execute a shell script without turning on executable status on the file. I want to force cygwin to be more like linux and not execute scripts directly on the command line unless changing mode to have executable status. Is this possible? Thanks Larry (2 Replies)
Discussion started by: larrye0123
2 Replies

2. Shell Programming and Scripting

opening new instance of cygwin from withing cygwin

I'm using cygwin on win7, What I would like to do is something like this: cygstart cygwin tail -f /foo/test.log | perl -pe 's/error/\e I know I can start a new instance using either of these: mintty -e ... cygstart tail ... But neither of those open in ANSI mode, so I can't do... (0 Replies)
Discussion started by: Validatorian
0 Replies

3. Solaris

crash dump

hi , i have machine that is crashed how i can enable core dump file & how can i find it ? :confused: (4 Replies)
Discussion started by: lid-j-one
4 Replies

4. Filesystems, Disks and Memory

HP-UX Disk crash?

Hi, First post. I am not to experienced in the Unix or HP-UX world but I'm learning. We have some problem with a HP rx4640 server. During boot it states the following: Checking for LVM volume groups and Activating (if any exist) Volume group "/dev/vg00" has been successfully changed. vgchange:... (7 Replies)
Discussion started by: hoff
7 Replies

5. Solaris

crash dump

Can anyone of you help me in enabling crash dump on Solaris 5.5.1 (1 Reply)
Discussion started by: csreenivas
1 Replies

6. Solaris

crash of my machine

I installed solaris 5.9 on a machine SunBlade100 512Mo of RAM and 18Go of hard disc, after the installation I have remark that the machine starts again after 10mn with 15 mn of walk, I downloaded and installed the last patchs on the machine but the poblème persists. someone can help me and tell me... (0 Replies)
Discussion started by: toufik
0 Replies

7. HP-UX

crash dump

hi friends, i know that when there is a crash then that memory image is put into /var/adm/crash but if the system hangs up and if i have access to console of that machine then how can i take the crash dump manully. thanks (2 Replies)
Discussion started by: mxms755
2 Replies

8. HP-UX

HP-UX system crash help please!!!

Hi, First of all, thanks for your help. I have downloaded freeBSD to study unix I'm here again 'cause my HP-UX 10.x has "broken". It raise this error: ---------------------------------------------------- Diagnostic System warning: = 0x1f005000 is POWERFAILED The diagnostic logging... (1 Reply)
Discussion started by: efrenba
1 Replies

9. UNIX for Dummies Questions & Answers

server crash

Our SUn Solaris Server has crashed second time in 2 days, reason is not known , we are trying to determine what could have gone wrong, any ideas, the power supply seems to be fine, there is no response from keyboard,monitor etc and we had to do a hot boot yesterday.. Any suggestions what could be... (9 Replies)
Discussion started by: knarayan
9 Replies

10. UNIX for Dummies Questions & Answers

Disk Crash

We have a Unix system with two hard drives. When we tried to access it this morning it had frozen, and when we rebooted it couldn't find one of the hard drives, and had quite a few bad data blocks on the other. Of course we fear the worst: that the drive is completely gone, but were not sure how... (1 Reply)
Discussion started by: Kgatliffe
1 Replies
Login or Register to Ask a Question