Skip to content

Commit 9bf7617

Browse files
committed
execvp can't return EINTR as far as I can tell, so the wrapper function was overkill
1 parent 4272597 commit 9bf7617

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

Diff for: plugins/DebuggerCore/unix/DebuggerCoreUNIX.cpp

+1-13
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,6 @@ void sigchld_handler(int sig, siginfo_t *info, void *p) {
6161

6262
}
6363

64-
//------------------------------------------------------------------------------
65-
// Name: execvp
66-
// Desc: execvp, but handles being interrupted
67-
//------------------------------------------------------------------------------
68-
int native::execvp(const char *file, char *const argv[]) {
69-
int ret;
70-
do {
71-
ret = ::execvp(file, argv);
72-
} while(ret == -1 && errno == EINTR);
73-
return ret;
74-
}
75-
7664
//------------------------------------------------------------------------------
7765
// Name: read
7866
// Desc: read, but handles being interrupted
@@ -449,7 +437,7 @@ void DebuggerCoreUNIX::execute_process(const QString &path, const QString &cwd,
449437

450438
*p = 0;
451439

452-
const int ret = native::execvp(argv_pointers[0], argv_pointers);
440+
const int ret = execvp(argv_pointers[0], argv_pointers);
453441

454442
// should be no need to cleanup, the process which allocated all that
455443
// space no longer exists!

Diff for: plugins/DebuggerCore/unix/DebuggerCoreUNIX.h

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2626
namespace DebuggerCore {
2727

2828
namespace native {
29-
int execvp(const char *file, char *const argv[]);
3029
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
3130
int select_ex(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, quint64 msecs);
3231
pid_t waitpid(pid_t pid, int *status, int options);

0 commit comments

Comments
 (0)