add posix_spawn [f]chdir file actions
[oweals/musl.git] / src / process / posix_spawn.c
index 306faa055af0512d06327a4e794bc2697777e5e9..29652197c58cbff007a3251b89a699e69dbbb2f7 100644 (file)
@@ -125,6 +125,14 @@ static int child(void *args_vp)
                                        __syscall(SYS_close, fd);
                                }
                                break;
+                       case FDOP_CHDIR:
+                               ret = __syscall(SYS_chdir, op->path);
+                               if (ret<0) goto fail;
+                               break;
+                       case FDOP_FCHDIR:
+                               ret = __syscall(SYS_fchdir, op->fd);
+                               if (ret<0) goto fail;
+                               break;
                        }
                }
        }