在cygwin终端中运行时,exe用cygwin gcc挂起

时间:2013-06-03 13:09:09

标签: cygwin

我使用cygwin gcc构建一个名为DatalogTest.exe的exe。

当我尝试运行它(./DatalogText.exe)时,我只是挂起。我不能用Ctrl-C杀死它,用Ctrl-Z暂停它或者通过在另一个shell中执行kill -9来杀死它。

strace给出了这个输出,然后它挂起:

$ strace DatalogTest.exe
    1       1 [main] DatalogTest (94016) **********************************************
   71      72 [main] DatalogTest (94016) Program name: C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test\DatalogTest.exe (windows pid 94016)
   51     123 [main] DatalogTest (94016) OS version:   Windows NT-6.1
   24     147 [main] DatalogTest (94016) **********************************************
  427     574 [main] DatalogTest (94016) sigprocmask: 0 = sigprocmask (0, 0x6123E468, 0x610FCAB0)
  309     883 [main] DatalogTest 94016 open_shared: name shared.5, n 5, shared 0x60FF0000 (wanted 0x60FF0000), h 0x8C, *m 6
   66     949 [main] DatalogTest 94016 heap_init: heap base 0x80000000, heap top 0x80000000, heap size 0x18000000 (402653184)
   38     987 [main] DatalogTest 94016 open_shared: name S-1-5-21-1408293143-2956554002-1949004742-1377.1, n 1, shared 0x60FE0000 (wanted 0x60FE0000), h 0x88, *m 6
   35    1022 [main] DatalogTest 94016 user_info::create: opening user shared for 'S-1-5-21-1408293143-2956554002-1949004742-1377' at 0x60FE0000
   35    1057 [main] DatalogTest 94016 user_info::create: user shared version 6467403B
   54    1111 [main] DatalogTest 94016 fhandler_pipe::create: name \\.\pipe\cygwin-c5e39b7a9d22bafb-94016-sigwait, size 164, mode PIPE_TYPE_MESSAGE
   49    1160 [main] DatalogTest 94016 fhandler_pipe::create: pipe read handle 0xA0
   18    1178 [main] DatalogTest 94016 fhandler_pipe::create: CreateFile: name \\.\pipe\cygwin-c5e39b7a9d22bafb-94016-sigwait
   33    1211 [main] DatalogTest 94016 fhandler_pipe::create: pipe write handle 0xA4
   43    1254 [main] DatalogTest 94016 dll_crt0_0: finished dll_crt0_0 initialization
  387    1641 [main] DatalogTest 94016 mount_info::conv_to_posix_path: conv_to_posix_path (C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test, no-keep-rel, no-add-slash)
   31    1672 [main] DatalogTest 94016 normalize_win32_path: C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test = normalize_win32_path (C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test)
   20    1692 [main] DatalogTest 94016 mount_info::conv_to_posix_path: /cygdrive/c/Project/hpj_main_LFC/ControlMicro/ServiceLayer/Datalog/Test = conv_to_posix_path (C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test)
  118    1810 [sig] DatalogTest 94016 wait_sig: entering ReadFile loop, my_readsig 0xA0, my_sendsig 0xA4

构建适用于另一个机器。

这里的strace输出:

 3531    3531 [main] DatalogTest (2868) **********************************************
  100    3631 [main] DatalogTest (2868) Program name: C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test\DatalogTest.exe (windows pid 2868)
   46    3677 [main] DatalogTest (2868) OS version:   Windows NT-6.1
   38    3715 [main] DatalogTest (2868) **********************************************
  383    4098 [main] DatalogTest (2868) sigprocmask: 0 = sigprocmask (0, 0x6123D468, 0x610FBA10)
  303    4401 [main] DatalogTest 2868 open_shared: name shared.5, n 5, shared 0x60FF0000 (wanted 0x60FF0000), h 0x80, *m 6
   64    4465 [main] DatalogTest 2868 heap_init: heap base 0x80000000, heap top 0x80000000, heap size 0x18000000 (402653184)
   66    4531 [main] DatalogTest 2868 open_shared: name S-1-5-21-1408293143-2956554002-1949004742-2274.1, n 1, shared 0x60FE0000 (wanted 0x60FE0000), h 0x78, *m 6
   46    4577 [main] DatalogTest 2868 user_info::create: opening user shared for 'S-1-5-21-1408293143-2956554002-1949004742-2274' at 0x60FE0000
   44    4621 [main] DatalogTest 2868 user_info::create: user shared version 6467403B
   71    4692 [main] DatalogTest 2868 fhandler_pipe::create: name \\.\pipe\cygwin-c5e39b7a9d22bafb-2868-sigwait, size 164, mode PIPE_TYPE_MESSAGE
  283    4975 [main] DatalogTest 2868 fhandler_pipe::create: pipe read handle 0x94
   67    5042 [main] DatalogTest 2868 fhandler_pipe::create: CreateFile: name \\.\pipe\cygwin-c5e39b7a9d22bafb-2868-sigwait
  184    5226 [main] DatalogTest 2868 fhandler_pipe::create: pipe write handle 0x98
   62    5288 [main] DatalogTest 2868 dll_crt0_0: finished dll_crt0_0 initialization
  654    5942 [sig] DatalogTest 2868 wait_sig: entering ReadFile loop, my_readsig 0x94, my_sendsig 0x98
  180    6122 [main] DatalogTest 2868 mount_info::conv_to_posix_path: conv_to_posix_path (C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test, no-keep-rel, no-add-slash)
   83    6205 [main] DatalogTest 2868 normalize_win32_path: C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test = normalize_win32_path (C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test)
   52    6257 [main] DatalogTest 2868 mount_info::conv_to_posix_path: /cygdrive/c/Jenkins-workspace/Lodam/Embedded/LFC/ControlMicro/ServiceLayer/Datalog/Test = conv_to_posix_path (C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test)
   83    6340 [main] DatalogTest 2868 sigprocmask: 0 = sigprocmask (0, 0x800180A8, 0x610FBA10)
  202    6542 [main] DatalogTest 2868 _cygwin_istext_for_stdio: fd 0: not open
   46    6588 [main] DatalogTest 2868 _cygwin_istext_for_stdio: fd 1: not open
   40    6628 [main] DatalogTest 2868 _cygwin_istext_for_stdio: fd 2: not open
  136    6764 [main] DatalogTest (2868) open_shared: name cygpid.2868, n 2868, shared 0x60FD0000 (wanted 0x60FD0000), h 0xC0, *m 2
   57    6821 [main] DatalogTest 2868 pinfo::thisproc: myself dwProcessId 2868
   42    6863 [main] DatalogTest 2868 time: 1370262553 = time(0)
 2768    9631 [main] DatalogTest 2868 environ_init: GetEnvironmentStrings returned 0xCE4D48
   87    9718 [main] DatalogTest 2868 environ_init: 0x80028290: !::=::\
   77    9795 [main] DatalogTest 2868 environ_init: 0x800282A0: ALLUSERSPROFILE=C:\ProgramData

在两台机器上:

$ gcc --version gcc(GCC)4.5.3

在挂机的机器上:

uname -r 1.7.18(0.263 / 5/3)

Windows版本: Windows 7专业版,Service Pack 1

在其他机器上:

$ uname -r 1.7.18(0.263 / 5/3)

Windows Server 2008 R2 Enterprise,Service Pack 1

0 个答案:

没有答案