aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig/mconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/mconf.c')
-rw-r--r--scripts/kconfig/mconf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 9fc837c9f..cda0473ac 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -498,7 +498,8 @@ static int exec_conf(void)
498 498
499 *argptr++ = NULL; 499 *argptr++ = NULL;
500 500
501 pipe(pipefd); 501 if (pipe(pipefd))
502 _exit(EXIT_FAILURE);
502 pid = fork(); 503 pid = fork();
503 if (pid == 0) { 504 if (pid == 0) {
504 sigprocmask(SIG_SETMASK, &osset, NULL); 505 sigprocmask(SIG_SETMASK, &osset, NULL);
@@ -863,9 +864,11 @@ static void conf(struct menu *menu)
863static void show_textbox(const char *title, const char *text, int r, int c) 864static void show_textbox(const char *title, const char *text, int r, int c)
864{ 865{
865 int fd; 866 int fd;
867 int len = strlen(text);
866 868
867 fd = creat(".help.tmp", 0777); 869 fd = creat(".help.tmp", 0777);
868 write(fd, text, strlen(text)); 870 if (write(fd, text, len) != len)
871 exit(1);
869 close(fd); 872 close(fd);
870 show_file(".help.tmp", title, r, c); 873 show_file(".help.tmp", title, r, c);
871 unlink(".help.tmp"); 874 unlink(".help.tmp");