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

Proposed by Gabriel Petrovay
Status: Merged
Approved by: Gabriel Petrovay
Approved revision: 10601
Merged at revision: 10603
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+87506@code.launchpad.net

This proposal supersedes 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) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Paul J. Lucas (paul-lucas) wrote : Posted in a previous version of this proposal

Should you check the result of "lStatus"?

Revision history for this message
Gabriel Petrovay (gabipetrovay) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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

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

I have removed the wait call.

The behavior is the same.

I thought that the usage of wait is a safe way to not delete theClient too early and crashing the child process when this still tries to access the client.

Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Paul J. Lucas (paul-lucas) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job debugger_broken_mac_build-2012-01-05T02-58-00.692Z is finished. The final status was:

All tests succeeded!

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:49:37 +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:49:37 +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:49:37 +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