team-ljy zipelo
공개| 1 | fn main() { |
| 2 | // 정상 동작 중에는 표준 오류에 아무것도 쓰지 않음(부모는 비어 있는 표준 오류를 기대함). |
| 3 | // 배포 빌드는 패닉 내용을 숨기고, 디버그 빌드는 기본 패닉 출력으로 원인을 자세히 남김. |
| 4 | if !cfg!(debug_assertions) { |
| 5 | std::panic::set_hook(Box::new(|_| {})); |
| 6 | } |
| 7 | if let Err(error) = zipelo_archive_worker::runtime::serve(std::io::stdin(), std::io::stdout()) { |
| 8 | if cfg!(debug_assertions) { |
| 9 | eprintln!("[worker {}] 작업자 통신 실패: {error:?}", std::process::id()); |
| 10 | } else { |
| 11 | eprintln!("작업자 통신 실패"); |
| 12 | } |
| 13 | std::process::exit(2); |
| 14 | } |
| 15 | } |