Get os pid from sid - oracle database script

Get os pid from sid - Oracle Database Script.

SET lines 123 col USERNAME
FOR a15 col OSUSER
FOR a8 col MACHINE
FOR a15 col PROGRAM
FOR a20
SELECT b.spid,
       a.username,
       a.program,
       a.osuser,
       a.machine,
       a.sid,
       a.serial#, a.status
FROM gv$session a,
     gv$process b
WHERE addr=paddr(+)
  AND sid=&sid;