| 844 | } |
| 845 | |
| 846 | static cs_error_t sam_parent_reply_send ( |
| 847 | cs_error_t err, |
| 848 | int parent_fd_in, |
| 849 | int parent_fd_out) |
| 850 | { |
| 851 | char reply; |
| 852 | |
| 853 | if (err == CS_OK) { |
| 854 | reply = SAM_REPLY_OK; |
| 855 | |
| 856 | if (sam_safe_write (parent_fd_out, &reply, sizeof (reply)) != sizeof (reply)) { |
| 857 | err = CS_ERR_LIBRARY; |
| 858 | goto error_reply; |
| 859 | } |
| 860 | |
| 861 | return (CS_OK); |
| 862 | } |
| 863 | |
| 864 | error_reply: |
| 865 | reply = SAM_REPLY_ERROR; |
| 866 | if (sam_safe_write (parent_fd_out, &reply, sizeof (reply)) != sizeof (reply)) { |
| 867 | return (CS_ERR_LIBRARY); |
| 868 | } |
| 869 | if (sam_safe_write (parent_fd_out, &err, sizeof (err)) != sizeof (err)) { |
| 870 | return (CS_ERR_LIBRARY); |
| 871 | } |
| 872 | |
| 873 | return (err); |
| 874 | } |
| 875 | |
| 876 | |
| 877 | static cs_error_t sam_parent_warn_signal_set ( |
no test coverage detected