1--TEST--
2Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in close during exec
3--INI--
4session.save_path=
5session.name=PHPSESSID
6session.save_handler=files
7--SKIPIF--
8<?php include('skipif.inc'); ?>
9--FILE--
10<?php
11
12ob_start();
13
14function open($save_path, $session_name) {
15    return true;
16}
17
18function close() {
19    echo "close: goodbye cruel world\n";
20    undefined_function();
21}
22
23function read($id) {
24    return '';
25}
26
27function write($id, $session_data) {
28    return true;
29}
30
31function destroy($id) {
32    return true;
33}
34
35function gc($maxlifetime) {
36    return true;
37}
38
39session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
40session_start();
41session_write_close();
42echo "um, hi\n";
43
44?>
45--EXPECTF--
46close: goodbye cruel world
47
48Fatal error: Uncaught Error: Call to undefined function undefined_function() in %s:%d
49Stack trace:
50#0 [internal function]: close()
51#1 %s(%d): session_write_close()
52#2 {main}
53  thrown in %s on line %d
54