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
=== modified file 'bin/debugger/main.cpp'
--- bin/debugger/main.cpp 2012-01-03 12:10:06 +0000
+++ bin/debugger/main.cpp 2012-01-04 16:49:37 +0000
@@ -214,10 +214,7 @@
214 return pID;214 return pID;
215 }215 }
216 216
217 // pID > 0
218
219 // Watch the process217 // Watch the process
220 //ProcessListener* lPl =
221 new ProcessListener(pID, &onExitProcess);218 new ProcessListener(pID, &onExitProcess);
222219
223 return 0;220 return 0;
@@ -375,12 +372,6 @@
375 theClient = new XqdbClient(lPort);372 theClient = new XqdbClient(lPort);
376 theClient->start();373 theClient->start();
377374
378 //tCommandLineHandler.execute();
379
380#ifndef WIN32
381 wait();
382#endif
383
384 delete theClient;375 delete theClient;
385376
386 } catch (...) {377 } catch (...) {
387378
=== modified file 'bin/debugger/process_listener.cpp'
--- bin/debugger/process_listener.cpp 2012-01-03 12:10:06 +0000
+++ bin/debugger/process_listener.cpp 2012-01-04 16:49:37 +0000
@@ -19,7 +19,6 @@
19#include <iostream>19#include <iostream>
2020
21#ifdef ZORBA_HAVE_PTHREAD_H21#ifdef ZORBA_HAVE_PTHREAD_H
22# include <sys/wait.h>
23# include <cassert>22# include <cassert>
24#endif23#endif
2524
2625
=== modified file 'bin/debugger/process_listener.h'
--- bin/debugger/process_listener.h 2012-01-03 12:10:06 +0000
+++ bin/debugger/process_listener.h 2012-01-04 16:49:37 +0000
@@ -21,6 +21,7 @@
2121
22#ifdef ZORBA_HAVE_PTHREAD_H22#ifdef ZORBA_HAVE_PTHREAD_H
23# include <pthread.h>23# include <pthread.h>
24# include <sys/wait.h>
24 typedef pthread_t ThreadId;25 typedef pthread_t ThreadId;
25 typedef pid_t ProcessId;26 typedef pid_t ProcessId;
26 typedef int ExitCode;27 typedef int ExitCode;

Subscribers

People subscribed via source and target branches