(dataDir: string)
| 55 | |
| 56 | /** Stop the daemon started above; the manifest carries its pid. */ |
| 57 | const stopDaemon = (dataDir: string): Effect.Effect<void> => |
| 58 | Effect.sync(() => manifestPid(dataDir)).pipe( |
| 59 | Effect.flatMap((pid) => |
| 60 | pid |
| 61 | ? Effect.try({ try: () => process.kill(pid, "SIGTERM"), catch: () => undefined }).pipe( |
| 62 | Effect.ignore, |
| 63 | ) |
| 64 | : Effect.void, |
| 65 | ), |
| 66 | Effect.ignore, |
| 67 | ); |
| 68 | |
| 69 | const withDaemon = Effect.acquireRelease( |
| 70 | Effect.sync(() => { |
no test coverage detected