Skip to content

Commit 90ad065

Browse files
committed
Set GMT_SESSION_NAME to the current process id
1 parent 7753b9c commit 90ad065

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pygmt/clib/session.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
data_kind,
3636
tempfile_from_geojson,
3737
tempfile_from_image,
38-
unique_name,
3938
)
4039

4140
FAMILIES = [
@@ -215,8 +214,8 @@ def __enter__(self):
215214
_init_cli_session = False
216215
# This is the first time a Session object is created.
217216
if _STATE["session_name"] is None:
218-
# Set GMT_SESSION_NAME to a customized, unique value.
219-
_STATE["session_name"] = os.environ["GMT_SESSION_NAME"] = unique_name()
217+
# Set GMT_SESSION_NAME to the current process id.
218+
_STATE["session_name"] = os.environ["GMT_SESSION_NAME"] = str(os.getpid())
220219
# Need to initialize the GMT CLI session.
221220
_init_cli_session = True
222221
self.create("pygmt-session")

0 commit comments

Comments
 (0)