Skip to content

Commit

Permalink
split up module
Browse files Browse the repository at this point in the history
  • Loading branch information
chgibb committed Sep 1, 2017
1 parent 09a1210 commit 6346556
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
11 changes: 11 additions & 0 deletions src/req/PIDInfo.ts
@@ -0,0 +1,11 @@
export interface PIDInfo
{
pid : number;
ppid : number;
command : string;
arguments : Array<string>;
isPHAT : boolean;
isPHATRenderer : boolean;
isPHATMain : boolean;
url : string;
}
19 changes: 7 additions & 12 deletions src/req/pidInfo.ts → src/req/getPIDInfo.ts
@@ -1,18 +1,11 @@
import * as electron from "electron";
const BrowserWindow = electron.remote.BrowserView;
const BrowserWindow = electron.remote.BrowserWindow;


const psNode = require("ps-node");

export interface PIDInfo
{
pid : number;
ppid : number;
command : string;
arguments : Array<string>;
isPHAT : boolean;
url : string;
}
import {PIDInfo} from "./PIDInfo";


export async function getPIDInfo(pid : number) : Promise<Array<PIDInfo>>
{
Expand All @@ -23,12 +16,14 @@ export async function getPIDInfo(pid : number) : Promise<Array<PIDInfo>>
reject(err);
for(let i = 0; i != resultList.length; ++i)
{
res.push(<PIDInfo>{
let info = <PIDInfo>{
pid : resultList[i].pid,
ppid : resultList[i].ppid,
command : resultList[i].command,
arguments : resultList[i].arguments
});
};

res.push(info);
}
resolve(res);
});
Expand Down

0 comments on commit 6346556

Please sign in to comment.