I have the following code:

```
port_temp = 8080
process_getpodsnamesipport = subprocess.call(['bash','getpodsnamesipport.sh', port_temp],preexec_fn=os.setsid)

```

I want to do something like:

```
os.killpg(os.getpgid(process_getpodsnamesipport.pid), signal.SIGKILL)

```

to kill the process but it's possible only with subprocess.Popen.

```
os.killpg(os.getpgid(process_getpodsnamesipport.pid), signal.SIGKILL)
AttributeError: 'int' object has no attribute 'pid'

```