Merge lp:~zorba-coders/zorba/process-2 into lp:zorba/process-module

Proposed by Nicolae Brinza
Status: Merged
Approved by: Nicolae Brinza
Approved revision: 52
Merged at revision: 38
Proposed branch: lp:~zorba-coders/zorba/process-2
Merge into: lp:zorba/process-module
Diff against target: 137 lines (+15/-17)
2 files modified
src/process-2.xq (+7/-7)
src/process-2.xq.src/process.cpp (+8/-10)
To merge this branch: bzr merge lp:~zorba-coders/zorba/process-2
Reviewer Review Type Date Requested Status
Ghislain Fourny Approve
Nicolae Brinza Approve
Review via email: mp+171824@code.launchpad.net

Commit message

Changed module's errors to the new modules guidelines; Potential fix for execvpe() on Macs

Description of the change

Changed module's errors to the new modules guidelines; Potential fix for execvpe() on Macs

To post a comment you must log in.
Revision history for this message
Nicolae Brinza (nbrinza) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Attempt to merge into lp:zorba/process-module failed due to conflicts:

text conflict in src/process-2.xq.src/process.cpp

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 process-2-2013-06-27T15-10-41.002Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 1 Approve, 1 Pending.

Revision history for this message
Ghislain Fourny (gislenius) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/process-2/+merge/171824

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/process-2/+merge/171824

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/process-2/+merge/171824

Stage "ZorbaVQ" failed.

Check console output at http://jenkins.lambda.nu/job/ZorbaVQ/92/console to view the results.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/process-2.xq'
2--- src/process-2.xq 2013-06-15 19:46:05 +0000
3+++ src/process-2.xq 2013-06-27 15:10:32 +0000
4@@ -26,8 +26,8 @@
5 : <p>
6 : Example:
7 : <pre>
8- : import module namespace proc = "http://zorba.io/modules/process";
9- : proc:exec("ls")
10+ : import module namespace p = "http://zorba.io/modules/process";
11+ : p:exec("ls")
12 : </pre>
13 : </p>
14 :
15@@ -86,7 +86,7 @@
16 :
17 : @return the result of the execution as an object
18 :
19- : @error p:PROC01 if an error occurred while communicating with the process.
20+ : @error p:COMMUNICATION if an error occurred while communicating with the process.
21 :)
22 declare %an:sequential function p:exec(
23 $filename as string
24@@ -113,7 +113,7 @@
25 :
26 : @return the result of the execution as an object
27 :
28- : @error p:PROC01 if an error occurred while communicating with the process.
29+ : @error p:COMMUNICATION if an error occurred while communicating with the process.
30 :)
31 declare %an:sequential function p:exec(
32 $filename as string,
33@@ -147,7 +147,7 @@
34 :
35 : @return the result of the execution as an object
36 :
37- : @error p:PROC01 if an error occurred while communicating with the process.
38+ : @error p:COMMUNICATION if an error occurred while communicating with the process.
39 :)
40 declare %an:sequential function p:exec(
41 $filename as string,
42@@ -168,7 +168,7 @@
43 :
44 : @return the result of the execution as an object
45 :
46- : @error p:PROC01 if an error occurred while communicating with the process.
47+ : @error p:COMMUNICATION if an error occurred while communicating with the process.
48 :)
49 declare %an:sequential function p:exec-command(
50 $cmd as string
51@@ -189,7 +189,7 @@
52 :
53 : @return the result of the execution as an object
54 :
55- : @error p:PROC01 if an error occurred while communicating with the process.
56+ : @error p:COMMUNICATION if an error occurred while communicating with the process.
57 :)
58 declare %an:sequential function p:exec-command(
59 $cmd as string,
60
61=== modified file 'src/process-2.xq.src/process.cpp'
62--- src/process-2.xq.src/process.cpp 2013-06-21 03:37:04 +0000
63+++ src/process-2.xq.src/process.cpp 2013-06-27 15:10:32 +0000
64@@ -53,9 +53,8 @@
65 {
66 extern char **environ;
67 char **saved = environ;
68- int rc;
69 environ = envp;
70- rc = execvp(program, argv);
71+ int rc = execvp(program, argv);
72 environ = saved;
73 return rc;
74 }
75@@ -105,8 +104,7 @@
76 wsprintf(lErrorBuffer,TEXT("Process Error Code: %d - Message= %s"),GetLastError(), (TCHAR *)lpvMessageBuffer);
77 LocalFree(lpvMessageBuffer);
78 Item lQName = ProcessModule::getItemFactory()->createQName(
79- "http://www.zorba-xquery.com/modules/process",
80- "PROC01");
81+ "http://zorba.io/modules/process", "COMMUNICATION");
82 #ifdef UNICODE
83 char error_str[1024];
84 WideCharToMultiByte(CP_UTF8, 0, lErrorBuffer, -1, error_str, sizeof(error_str), NULL, NULL);
85@@ -239,7 +237,7 @@
86 || !CreatePipe(&lErrRead,&lStdErr,&lSecurityAttributes,1024*1024) // std::cerr >> lErrRead
87 ){
88 Item lQName = ProcessModule::getItemFactory()->createQName(
89- "http://www.zorba-xquery.com/modules/process", "PROC01");
90+ "http://zorba.io/modules/process", "COMMUNICATION");
91 throw USER_EXCEPTION(lQName,
92 "Couldn't create one of std::cout/std::cerr pipe for child process execution."
93 );
94@@ -261,7 +259,7 @@
95 lErrorMsg
96 << "Couldn't get exit code from child process. Executed command: '" << aCommand << "'.";
97 Item lQName = ProcessModule::getItemFactory()->createQName(
98- "http://www.zorba-xquery.com/modules/process", "PROC01");
99+ "http://zorba.io/modules/process", "COMMUNICATION");
100 throw USER_EXCEPTION(lQName, lErrorMsg.str().c_str());
101 }
102
103@@ -451,7 +449,7 @@
104 std::stringstream lErrorMsg;
105 lErrorMsg << "Failed to execute the command (" << code << ")";
106 Item lQName = ProcessModule::getItemFactory()->createQName(
107- "http://www.zorba-xquery.com/modules/process", "PROC01");
108+ "http://zorba.io/modules/process", "COMMUNICATION");
109 throw USER_EXCEPTION(lQName, lErrorMsg.str().c_str());
110 }
111 exit_code = code;
112@@ -489,7 +487,7 @@
113 std::stringstream lErrorMsg;
114 lErrorMsg << "Failed to execute the command (" << pid << ")";
115 Item lQName = ProcessModule::getItemFactory()->createQName(
116- "http://www.zorba-xquery.com/modules/process", "PROC01");
117+ "http://zorba.io/modules/process", "COMMUNICATION");
118 throw USER_EXCEPTION(lQName, lErrorMsg.str().c_str());
119 return NULL;
120 }
121@@ -515,7 +513,7 @@
122 std::stringstream lErrorMsg;
123 lErrorMsg << "Failed to close the err stream (" << status << ")";
124 Item lQName = ProcessModule::getItemFactory()->createQName(
125- "http://www.zorba-xquery.com/modules/process", "PROC01");
126+ "http://zorba.io/modules/process", "COMMUNICATION");
127 throw USER_EXCEPTION(lQName, lErrorMsg.str().c_str());
128 }
129
130@@ -528,7 +526,7 @@
131 std::stringstream lErrorMsg;
132 lErrorMsg << "Failed to wait for child process ";
133 Item lQName = ProcessModule::getItemFactory()->createQName(
134- "http://www.zorba-xquery.com/modules/process", "PROC01");
135+ "http://zorba.io/modules/process", "COMMUNICATION");
136 throw USER_EXCEPTION(lQName, lErrorMsg.str().c_str());
137 }
138

Subscribers

People subscribed via source and target branches

to all changes: