diff --git a/python/paddle/fluid/tests/unittests/test_imperative_signal_handler.py b/python/paddle/fluid/tests/unittests/test_imperative_signal_handler.py index 775bf7941aaff992d1212bac9f5da0d56b240ffc..4941e9dec52c4033e9e8ada0b73002d5cedbab1b 100644 --- a/python/paddle/fluid/tests/unittests/test_imperative_signal_handler.py +++ b/python/paddle/fluid/tests/unittests/test_imperative_signal_handler.py @@ -41,7 +41,7 @@ class TestDygraphDataLoaderSingalHandler(unittest.TestCase): def test_child_process_exit_with_error(self): def __test_process__(): core._set_process_signal_handler() - sys.exit(1) + os._exit(os.EX_DATAERR) exception = None try: