Merge lp:~zorba-coders/zorba/debugger_broken_mac_build into lp:zorba

Proposed by Gabriel Petrovay
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/debugger_broken_mac_build
Merge into: lp:zorba
Diff against target: 51 lines (+1/-10)
3 files modified
bin/debugger/main.cpp (+0/-9)
bin/debugger/process_listener.cpp (+0/-1)
bin/debugger/process_listener.h (+1/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/debugger_broken_mac_build
Reviewer Review Type Date Requested Status
Paul J. Lucas Approve
Gabriel Petrovay (community) Approve
Review via email: mp+87469@code.launchpad.net

This proposal has been superseded by a proposal from 2012-01-04.

Commit message

Fixes the two problems on mac that break the build:
- usage of wait() without parameters
- moved the "sys/wait" include in "process_listener.h" since that uses pid_t that is available once this header is included.

Description of the change

Fixes the two problems on mac that break the build:
- usage of wait() without parameters
- moved the "sys/wait" include in "process_listener.h" since that uses pid_t that is available once this header is included.

To post a comment you must log in.
Revision history for this message
Gabriel Petrovay (gabipetrovay) :
review: Approve
Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

Should you check the result of "lStatus"?

Revision history for this message
Gabriel Petrovay (gabipetrovay) wrote :

I want to quit, whatever the status is. What would be the solution in this case?

Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

If you just want to quit, then it doesn't matter what the status is. But if you just want to quit, why do you need to wait() at all?

Revision history for this message
Gabriel Petrovay (gabipetrovay) wrote :

The main process would exit and you get a console prompt even though the zorba debugger did not finish.

Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

You get a console prompt on a non-Windows platform?? If not, then just #ifdef out the wait completely on Mac/Linux.

10601. By Gabriel Petrovay

removed wait call on non-Windows

Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/debugger/main.cpp'
2--- bin/debugger/main.cpp 2012-01-03 12:10:06 +0000
3+++ bin/debugger/main.cpp 2012-01-04 16:37:06 +0000
4@@ -214,10 +214,7 @@
5 return pID;
6 }
7
8- // pID > 0
9-
10 // Watch the process
11- //ProcessListener* lPl =
12 new ProcessListener(pID, &onExitProcess);
13
14 return 0;
15@@ -375,12 +372,6 @@
16 theClient = new XqdbClient(lPort);
17 theClient->start();
18
19- //tCommandLineHandler.execute();
20-
21-#ifndef WIN32
22- wait();
23-#endif
24-
25 delete theClient;
26
27 } catch (...) {
28
29=== modified file 'bin/debugger/process_listener.cpp'
30--- bin/debugger/process_listener.cpp 2012-01-03 12:10:06 +0000
31+++ bin/debugger/process_listener.cpp 2012-01-04 16:37:06 +0000
32@@ -19,7 +19,6 @@
33 #include <iostream>
34
35 #ifdef ZORBA_HAVE_PTHREAD_H
36-# include <sys/wait.h>
37 # include <cassert>
38 #endif
39
40
41=== modified file 'bin/debugger/process_listener.h'
42--- bin/debugger/process_listener.h 2012-01-03 12:10:06 +0000
43+++ bin/debugger/process_listener.h 2012-01-04 16:37:06 +0000
44@@ -21,6 +21,7 @@
45
46 #ifdef ZORBA_HAVE_PTHREAD_H
47 # include <pthread.h>
48+# include <sys/wait.h>
49 typedef pthread_t ThreadId;
50 typedef pid_t ProcessId;
51 typedef int ExitCode;

Subscribers

People subscribed via source and target branches