Skip to content

Commit e17d52d

Browse files
Fix clone failed (#277)
Fix a bug while the clone systemcall (which pthread_create really calls) execution failed
1 parent 4682d79 commit e17d52d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hev-jni.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ native_start_service (JNIEnv *env, jobject thiz, jstring config_path, jint fd)
121121
(*env)->ReleaseStringUTFChars (env, config_path, (const char *)bytes);
122122

123123
res = pthread_create (&work_thread, NULL, thread_handler, tdata);
124-
if (res < 0) {
124+
if (res != 0) {
125125
free (tdata->path);
126126
free (tdata);
127127
goto exit;

0 commit comments

Comments
 (0)