You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
- Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include "config.h"
extern char *shell_name;
#if defined (JOB_CONTROL)
extern pid_t shell_pgrp;
-extern int give_terminal_to ();
+extern int give_terminal_to __P((pid_t, int));
#endif /* JOB_CONTROL */
/* The current maintainer of the shell. You change this in the
Makefile. */
#if !defined (MAINTAINER)
-#define MAINTAINER "bash-maintainers@prep.ai.mit.edu"
+#define MAINTAINER "bash-maintainers@gnu.org"
#endif
char *the_current_maintainer = MAINTAINER;
format string. */
void
file_error (filename)
- char *filename;
+ const char *filename;
{
report_error ("%s: %s", filename, strerror (errno));
}
}
#endif
+#if 0
fprintf (stderr, "Report this to %s\n", the_current_maintainer);
+#endif
+
fprintf (stderr, "Stopping myself...");
fflush (stderr);
char *h;
#if defined (JOB_CONTROL)
- give_terminal_to (shell_pgrp);
+ give_terminal_to (shell_pgrp, 0);
#endif /* JOB_CONTROL */
#if defined (PREFER_STDARG)
}
#endif
+#if 0
fprintf (stderr, "Report this to %s\n", the_current_maintainer);
+#endif
+
fprintf (stderr, "Stopping myself...");
fflush (stderr);
exit (2);
}
+#ifdef DEBUG
void
#if defined (PREFER_STDARG)
itrace (const char *format, ...)
{
va_list args;
- fprintf(stderr, "TRACE: pid %d: ", (int)getpid());
+ fprintf(stderr, "TRACE: pid %ld: ", (long)getpid());
#if defined (PREFER_STDARG)
va_start (args, format);
fflush(stderr);
}
-#if 0
/* A trace function for silent debugging -- doesn't require a control
terminal. */
void
static FILE *tracefp = (FILE *)NULL;
if (tracefp == NULL)
- tracefp = fopen("/usr/tmp/bash-trace.log", "a+");
+ tracefp = fopen("/tmp/bash-trace.log", "a+");
if (tracefp == NULL)
tracefp = stderr;
else
fcntl (fileno (tracefp), F_SETFD, 1); /* close-on-exec */
- fprintf(tracefp, "TRACE: pid %d: ", getpid());
+ fprintf(tracefp, "TRACE: pid %ld: ", (long)getpid());
#if defined (PREFER_STDARG)
va_start (args, format);
fflush(tracefp);
}
-#endif /* 0 */
#endif /* USE_VARARGS */
+#endif /* DEBUG */
static char *cmd_error_table[] = {
"unknown command error", /* CMDERR_DEFAULT */