diff --git a/components/drivers/include/drivers/serial.h b/components/drivers/include/drivers/serial.h index 1d0b9afe5c..b4c6fb4a7a 100644 --- a/components/drivers/include/drivers/serial.h +++ b/components/drivers/include/drivers/serial.h @@ -25,6 +25,7 @@ #define BAUD_RATE_115200 115200 #define BAUD_RATE_230400 230400 #define BAUD_RATE_460800 460800 +#define BAUD_RATE_500000 500000 #define BAUD_RATE_921600 921600 #define BAUD_RATE_2000000 2000000 #define BAUD_RATE_2500000 2500000 diff --git a/components/drivers/include/drivers/serial_v2.h b/components/drivers/include/drivers/serial_v2.h index b1020aaf99..26ce0550eb 100644 --- a/components/drivers/include/drivers/serial_v2.h +++ b/components/drivers/include/drivers/serial_v2.h @@ -22,6 +22,7 @@ #define BAUD_RATE_115200 115200 #define BAUD_RATE_230400 230400 #define BAUD_RATE_460800 460800 +#define BAUD_RATE_500000 500000 #define BAUD_RATE_921600 921600 #define BAUD_RATE_2000000 2000000 #define BAUD_RATE_2500000 2500000 diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index 405dbcbf9f..d667d70efd 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -922,6 +922,7 @@ static const struct speed_baudrate_item _tbl[] = {B115200, BAUD_RATE_115200}, {B230400, BAUD_RATE_230400}, {B460800, BAUD_RATE_460800}, + {B500000, BAUD_RATE_500000}, {B921600, BAUD_RATE_921600}, {B2000000, BAUD_RATE_2000000}, {B3000000, BAUD_RATE_3000000}, diff --git a/components/drivers/serial/serial_v2.c b/components/drivers/serial/serial_v2.c index 5784f1fee7..a6e4e22def 100644 --- a/components/drivers/serial/serial_v2.c +++ b/components/drivers/serial/serial_v2.c @@ -1024,6 +1024,7 @@ const static struct speed_baudrate_item _tbl[] = {B115200, BAUD_RATE_115200}, {B230400, BAUD_RATE_230400}, {B460800, BAUD_RATE_460800}, + {B500000, BAUD_RATE_500000}, {B921600, BAUD_RATE_921600}, {B2000000, BAUD_RATE_2000000}, {B3000000, BAUD_RATE_3000000}, diff --git a/components/lwp/lwp.c b/components/lwp/lwp.c index cc4a1f3974..c6f87a60bf 100644 --- a/components/lwp/lwp.c +++ b/components/lwp/lwp.c @@ -1282,6 +1282,10 @@ pid_t lwp_execve(char *filename, int debug, int argc, char **argv, char **envp) } } + else + { + lwp->background = RT_TRUE; + } thread->lwp = lwp; #ifndef ARCH_MM_MMU struct lwp_app_head *app_head = (struct lwp_app_head*)lwp->text_entry; diff --git a/components/lwp/lwp.h b/components/lwp/lwp.h index 7fbcb0c666..46b1671463 100644 --- a/components/lwp/lwp.h +++ b/components/lwp/lwp.h @@ -126,6 +126,7 @@ struct rt_lwp struct lwp_avl_struct *address_search_head; /* for addressed object fast rearch */ char working_directory[DFS_PATH_MAX]; int debug; + int background; uint32_t bak_first_ins; #ifdef LWP_ENABLE_ASID diff --git a/components/lwp/lwp_pid.c b/components/lwp/lwp_pid.c index 39d5e7f88c..1979a6a8fd 100644 --- a/components/lwp/lwp_pid.c +++ b/components/lwp/lwp_pid.c @@ -445,7 +445,7 @@ void lwp_free(struct rt_lwp* lwp) } rt_hw_interrupt_enable(level); - /* for parent */ + if (!lwp->background) { struct termios *old_stdin_termios = get_old_termios(); struct rt_lwp *old_lwp = NULL; @@ -466,7 +466,10 @@ void lwp_free(struct rt_lwp* lwp) lwp->tty = RT_NULL; } } + } + /* for parent */ + { if (lwp->parent) { struct rt_thread *thread;