Skip to content
Browse files

Improve error-reporting on attach failures somewhat.

  • Loading branch information...
1 parent bc03f3d commit b3eb80f06418556d50562fe2e6f87a4b04f21eb7 @nelhage committed Jan 18, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 reptyr.c
View
6 reptyr.c
@@ -120,9 +120,9 @@ int main(int argc, char **argv) {
if (argc > 1) {
pid_t child = atoi(argv[1]);
- if (attach_child(child,
- ptsname(pty))) {
- perror("Attaching to child");
+ int err;
+ if ((err = attach_child(child, ptsname(pty)))) {
+ fprintf(stderr, "Attaching to child: %s\n", strerror(-err));
return 1;
}
} else {

0 comments on commit b3eb80f

Please sign in to comment.
Something went wrong with that request. Please try again.